Guillaume Gomez
8f1ef6e3be
Fix error code numbers
2018-06-23 22:08:40 +02:00
Taylor Cramer
ee51a3c10a
Review nits and updates
...
Move future_from_generator out of raw
Update await to use $crate
Renumber errors
2018-06-22 11:36:01 -07:00
Taylor Cramer
cf844b547d
async await desugaring and tests
2018-06-21 22:36:36 -07:00
Simon Sapin
e2aef92c19
Stabilize #[repr(transparent)]
...
Tracking issue FCP: https://github.com/rust-lang/rust/issues/43036#issuecomment-394094318
Reference PR: https://github.com/rust-lang-nursery/reference/pull/353
2018-06-12 06:49:07 +02:00
Guillaume Gomez
f2349d5ec6
Fix error codes
2018-06-10 14:04:48 +02:00
Jorge Aparicio
63f18e108a
s/panic_fmt/panic_impl/g in docs
2018-06-03 13:46:19 +02:00
David Wood
138472bdc6
Checking location and syntax of non_exhaustive attribute.
2018-04-02 23:02:29 +01:00
Taylor Cramer
3c65f53620
Stabilize match_default_bindings
...
This includes a submodule update to rustfmt
in order to allow a stable feature declaration.
2018-03-28 11:13:13 +02:00
Taylor Cramer
0f5b52e4a8
Stabilize conservative_impl_trait
2018-03-26 10:43:03 +02:00
kennytm
8d57071cbb
Rollup merge of #49162 - tmandry:stabilize-termination-trait, r=nikomatsakis
...
Stabilize termination_trait, split out termination_trait_test
For #48453 .
First time contribution, so I'd really appreciate any feedback on how this PR can be better.
Not sure exactly what kind of documentation update is needed. If there is no PR to update the reference, I can try doing that this week as I have time.
2018-03-25 01:26:32 +08:00
Niko Matsakis
2e8a1abc2d
also fix the Fixed code
2018-03-21 19:23:29 -04:00
Niko Matsakis
48c4e352d3
WIP do not use in-band lifetimes
2018-03-21 19:22:41 -04:00
Niko Matsakis
3955708576
WIP tweak example to include feature gate
2018-03-21 16:31:20 -04:00
Niko Matsakis
fc3c90cf8a
report an error if we see an unexpected lifetime in impl Trait
...
But leave closure substs alone.
2018-03-21 05:40:59 -04:00
Tyler Mandry
5ccf3ffab2
diagnostics: Remove main return type errors from E0580
2018-03-20 00:08:27 -05:00
Oliver Schneider
16d560fd99
Remove unused error E0020
2018-03-08 08:34:14 +01:00
Matthias Krüger
4452446292
fix more typos found by codespell.
2018-02-17 17:38:49 +01:00
Badel2
498ef20a2a
Trait objects cannot contain associated constants
2018-02-06 18:44:38 +01:00
John Kåre Alsaker
ccf0d8399e
Adds support for immovable generators. Move checking of invalid borrows across suspension points to borrowck. Fixes #44197 , #45259 and #45093 .
2018-01-23 05:10:38 +01:00
Robin Kruppe
2be697bc21
Implement repr(transparent)
2018-01-16 08:58:32 +01:00
Esteban Küber
aaf3e318fc
Do not emit type errors on recovered blocks
...
When a parse error occurs on a block, the parser will recover and create
a block with the statements collected until that point. Now a flag
stating that a recovery has been performed in this block is propagated
so that the type checker knows that the type of the block (which will be
identified as `()`) shouldn't be checked against the expectation to
reduce the amount of irrelevant diagnostic errors shown to the user.
2017-12-21 14:57:42 -08:00
bors
7b637b778d
Auto merge of #46187 - notriddle:patch-1, r=QuietMisdreavus
...
Rename C-like enum to Field-less enum
There is no need to reference the C programming language to explain this concept.
2017-12-07 07:16:44 +00:00
Michael Howell
a126a732eb
Fix overlong line length
2017-12-06 10:54:50 -07:00
Michael Howell
d6ba2e4d1c
Fix dangling close paren
2017-12-06 10:54:03 -07:00
Michael Howell
a0628ef3d1
Update diagnostics.rs
2017-11-22 10:58:31 -07:00
Taylor Cramer
91b7920c09
Implement in-band lifetime bindings
2017-11-22 12:44:09 -05:00
bors
d6d09e0b4d
Auto merge of #45879 - nikomatsakis:nll-kill-cyclic-closures, r=arielb1
...
move closure kind, signature into `ClosureSubsts`
Instead of using side-tables, store the closure-kind and signature in the substitutions themselves. This has two key effects:
- It means that the closure's type changes as inference finds out more things, which is very nice.
- As a result, it avoids the need for the `freshen_closure_like` code (though we still use it for generators).
- It avoids cyclic closures calls.
- These were never meant to be supported, precisely because they make a lot of the fancy inference that we do much more complicated. However, due to an oversight, it was previously possible -- if challenging -- to create a setup where a closure *directly* called itself (see e.g. #21410 ).
We have to see what the effect of this change is, though. Needs a crater run. Marking as [WIP] until that has been assessed.
r? @arielb1
2017-11-21 22:52:19 +00:00
Niko Matsakis
b9c766ccc0
fix example more
2017-11-20 16:53:48 -05:00
Niko Matsakis
2151e482ac
fix example for E0644
2017-11-20 13:34:24 -05:00
Niko Matsakis
27bedfa36b
give better error messages when a cycle arises
2017-11-18 07:49:52 -05:00
Taylor Cramer
bc4810d907
Fix impl Trait Lifetime Handling
...
After this change, impl Trait existentials are
desugared to a new `abstract type` definition
paired with a set of lifetimes to apply.
In-scope generics are included as parents of the
`abstract type` generics. Parent regions are
replaced with static, and parent regions
referenced in the `impl Trait` type are duplicated
at the end of the `abstract type`'s generics.
2017-11-17 10:01:54 -08:00
Christopher Vittal
779fc372c7
Move E0562 to librustc from librustc_typeck
...
With the check for impl trait moving from type checking to HIR lowering
the error needs to move too.
2017-11-15 15:46:01 -05:00
kennytm
0b02377614
Rollup merge of #45585 - frewsxcv:frewsxcv-diagnostic, r=kennytm
...
Remove 'future Rust version' code block in diagnostic text.
Fixes https://github.com/rust-lang/rust/issues/43780 .
2017-10-28 15:56:25 +08:00
Corey Farwell
b1681271e5
Remove 'future Rust version' code block in diagnostic text.
...
Fixes https://github.com/rust-lang/rust/issues/43780 .
2017-10-27 22:49:56 -04:00
steveklabnik
4c6942d262
Remove 'just' in diagnostics
...
This is better writing
2017-10-26 09:27:20 -04:00
gaurikholkar
4bbb58d429
remove error code description
2017-09-26 11:55:53 -04:00
bors
4b8bf391fd
Auto merge of #44735 - tirr-c:issue-42143, r=arielb1
...
Friendlier error message for closure argument type mismatch
Rebased #42270 .
Fixes #42143 .
---
`test.rs`:
```rust
fn main() {
foo(|_: i32, _: usize| ());
}
fn foo<F>(_: F) where F: Fn(&str, usize) {}
```
Before:
```
error[E0281]: type mismatch: `[closure@test.rs:2:9: 2:30]` implements the trait `std::ops::Fn<(i32, usize)>`, but the trait `for<'r> std::ops::Fn<(&'r str, usize)>` is required
--> test.rs:2:5
|
2 | foo(|_: i32, _: usize| ());
| ^^^ --------------------- implements `std::ops::Fn<(i32, usize)>`
| |
| expected &str, found i32
| requires `for<'r> std::ops::Fn<(&'r str, usize)>`
|
= note: required by `foo`
```
After (early):
```
error[E0631]: type mismatch in closure arguments
--> test.rs:2:5
|
2 | foo(|_: i32, _: usize| ());
| ^^^ --------------------- takes arguments of type `i32` and `usize`
| |
| expected arguments of type `&str` and `usize`
|
= note: required by `foo`
```
After (current):
```
error[E0631]: type mismatch in closure arguments
--> test.rs:2:5
|
2 | foo(|_: i32, _: usize| ());
| ^^^ --------------------- found signature of `fn(i32, usize) -> _`
| |
| expected signature of `for<'r> fn(&'r str, usize) -> _`
|
= note: required by `foo`
```
~~Compiler output has been changed, and a few tests are failing. Help me writing/fixing tests!~~
r? @nikomatsakis
2017-09-26 05:02:03 +00:00
Ariel Ben-Yehuda
c72a979979
move unsafety checking to MIR
...
No functional changes intended.
2017-09-24 12:46:00 +03:00
Wonwoo Choi
1bfbfb20a1
Print fn signature when there is closure argument type mismatch
...
Fixes #42143 .
E0281 is totally replaced by E0631. UI tests are updated accordingly.
2017-09-23 10:15:30 +09:00
Taylor Cramer
64314e3ae2
Implement underscore lifetimes
2017-09-20 23:45:05 -07:00
Niko Matsakis
88e4bf6827
fix "correct" case in diagnostic error message
2017-09-10 06:08:29 -04:00
gaurikholkar
cfc7cf3961
adding E0623 for LateBound regions
2017-09-09 11:12:27 +05:30
Ariel Ben-Yehuda
6866aea5af
implement improved on_unimplemented directives
2017-09-03 13:10:54 +03:00
Ariel Ben-Yehuda
243aa12d6e
refactor and centralize on_unimplemented parsing
2017-09-03 13:10:53 +03:00
Alex Crichton
c872f47276
Merge remote-tracking branch 'origin/master' into gen
2017-08-25 07:15:12 -07:00
Vadim Petrochenkov
000f87ab1e
Desugar parenthesized generic arguments in HIR
2017-08-19 02:14:53 +03:00
Alex Crichton
4b5f330c70
Merge remote-tracking branch 'origin/master' into gen
2017-08-17 13:23:20 -07:00
Anthony Defranceschi
d6cdefc4e0
added whitespace
2017-08-17 01:39:23 +02:00
Anthony Defranceschi
fe06b70b2a
E0106: field lifetimes
...
I've added an example for custom type lifetimes located in another `struct` fields.
2017-08-16 22:49:18 +02:00
Alex Crichton
22ebcaca16
Choose another error code
2017-08-14 19:38:32 -07:00