| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Resolve absolute paths as extern under a feature flag
cc https://github.com/rust-lang/rust/issues/44660
r? @nikomatsakis
|
|
Ignore `unsopported constant expr` error
Fixes #46553
|
|
|
|
MIR borrowck: error message confuses locals and temporaries
Fixes #46471 and fixes #46472 (see [this Gitter comment](https://gitter.im/rust-impl-period/WG-compiler-nll?at=5a2d5cb53ae2aa6b3facf0c2)).
r? @arielb1
|
|
move `resolve_lifetimes` into a proper query
Now that we made `resolve_lifetimes` into a query, elision errors no
longer abort compilation, which affects some tests.
Also, remove `dep_graph_crosscontaminate_tables` -- there is no a path in
the dep-graph, though red-green handles it. The same scenario
is (correctly) tested by issue-42602.rs in any case.
r? @michaelwoerister
|
|
|
|
Clean up the MIR borrowck code
I want to avoid the new code to start with so much technical debt.
r? @nikomatsakis
|
|
Now that we made `resolve_lifetimes` into a query, elision errors no
longer abort compilation, which affects some tests.
Also, remove `dep_graph_crosscontaminate_tables` -- there is no a path in
the dep-graph, though red-green handles it. The same scenario
is (correctly) tested by issue-42602.rs in any case.
|
|
|
|
zackmdavis:one_time_private_enum_variant_reexport_error, r=estebank
one-time diagnostics for private enum variants glob reëxport

r? @estebank
|
|
|
|
This fixes the handling of reassignment of struct fields.
|
|
We issue just one message for an erroneous glob private variant reëxport
(using the Session's one-time-diagnostics capability), but individual
(non-glob) such erroneous reëxports still get their own messages. The
suggestion to make the enum public is also one-time.
The enum variant reëxport error didn't have an associated error code
(and remedying this here is deemed out of the scope of this commit), so
we resort to the expediency of using 0 as the `DiagnosticMessageId`
value.
Adding Debug to NameResolution was helpful in development.
This resolves #46209.
|
|
Fix bad error message for cannot_reborrow_already_uniquely_borrowed
|
|
Fixes #45638
|
|
Modify message for keyword as identifier name
This is a temporary solution to #46311.
The message is generic enough to cover both cases and is probably a fine enough solution to the specific problem described in the task. However, the underlying reason for this to be wrong is that `next_token_inner` returns `Lifetime` even if the token is a label. That's not simple, as the syntax for both can be quite similar and it may need to take a look to the next token to make a decision. I'm not sure I have enough knowledge about the project to be able to solve that (yet!), so I thought I'll fix the immediate problem first.
|
|
|
|
Allow feature-gate tests to live in ui/ and migrate most of the tests from compile-fail
The PR consists of three commits:
1. change tidy to allow feature-gate tests to live in ui/
2. migrate some feature gate tests to ui/ with renaming only
3. migrate some feature gate tests to ui/ with also removing `// gate-test-...` lines and renaming them to the standard `feature-gate-<feat-name>.rs` format.
|
|
|
|
We also rename some of the files to conform to the
feature-gate-<feat_name>.rs pattern that is most common.
|
|
Renames only in this commit, and obviously
.stderr file additions.
|
|
|
|
|
|
Stabilize abi_sysv64
Closes #36167, stabilizing the use of the "sysv64" ABI on x64 platforms where it is not the default ABI.
FCP on this is complete in the tracking issue.
|
|
MIR borrowck: implement union-and-array-compatible semantics
Fixes #44831.
Fixes #44834.
Fixes #45537.
Fixes #45696 (by implementing DerefPure semantics, which is what we want going forward).
r? @nikomatsakis
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This fixes the tests for issue #29793
|
|
|
|
Fixes #44831.
Fixes #44834.
Fixes #45537.
Fixes #45696 (by implementing DerefPure semantics, which is what we want
going forward).
|
|
|
|
|
|
This revealed some shortcomings, one of which is fixed. Fixes #45937.
|
|
|
|
Use suggestions instead of notes ref mismatches
On type mismatch errors, use a suggestion when encountering minimal
differences in type differences due to refs, instead of a note.
|
|
Generic Associated Types Parsing & Name Resolution
Hi!
This PR adds parsing for generic associated types! :tada: :tada: :tada:
Tracking Issue: #44265
## Notes For Reviewers
* [x] I still need to add the stdout and stderr files to my ui tests. It takes me a *long* time to compile the compiler locally, so I'm going to add this as soon as possible in the next day or so.
* [ ] My current ui tests aren't very good or very thorough. I'm reusing the `parse_generics` and `parse_where_clause` methods from elsewhere in the parser, so my changes work without being particularly complex. I'm not sure if I should duplicate all of the generics test cases for generic associated types. It might actually be appropriate to duplicate everything here, since we don't want to rely on an implementation detail in case it changes in the future. If you think so too, I'll adapt all of the generics test cases into the generic associated types test cases.
* [ ] There is still more work required to make the run-pass tests pass here. In particular, we need to make the following errors disappear:
```
error[E0110]: lifetime parameters are not allowed on this type
--> ./src/test/run-pass/rfc1598-generic-associated-types/streaming_iterator.rs:23:41
|
23 | bar: <T as StreamingIterator>::Item<'static>,
| ^^^^^^^ lifetime parameter not allowed on this type
```
```
error[E0261]: use of undeclared lifetime name `'a`
--> ./src/test/run-pass/rfc1598-generic-associated-types/iterable.rs:15:47
|
15 | type Iter<'a>: Iterator<Item = Self::Item<'a>>;
| ^^ undeclared lifetime
```
There is a FIXME comment in streaming_iterator. If you uncomment that line, you get the following:
```
error: expected one of `!`, `+`, `,`, `::`, or `>`, found `=`
--> ./src/test/run-pass/rfc1598-generic-associated-types/streaming_iterator.rs:29:45
|
29 | fn foo<T: for<'a> StreamingIterator<Item<'a>=&'a [i32]>>(iter: T) { /* ... */ }
| ^ expected one of `!`, `+`, `,`, `::`, or `>` here
```
r? @nikomatsakis
|
|
On type mismatch errors, use a suggestion when encountering minimal
differences in type differences due to refs, instead of a note.
|
|
make coercions to `!` in unreachable code a hard error
This was added to cover up a lazy extra semicolon in #35849, but does
not actually make sense. This is removed as a part of the stabilization
of `never_type`.
|
|
MIR-borrowck: immutable unique closure upvars can be mutated
Fixes #46023 and #46160 (see [this comment](https://github.com/rust-lang/rust/pull/46236#issuecomment-347204874)).
|