| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Make the `is_import` flag in `ScopeSet` independent from namespace
Fix rebase
|
|
Cleanup some surrounding code.
Support resolution of intra doc links in unnamed block scopes.
(Paths from rustdoc now use early resolution and no longer need results of late resolution like all the built ribs.)
Fix one test hitting file path limits on Windows.
|
|
Move `Resolver` fields specific to late resolution to the new visitor.
The `current_module` field from `Resolver` is replaced with two `current_module`s in `LateResolutionVisitor` and `BuildReducedGraphVisitor`.
Outside of those visitors `current_module` is replaced by passing `parent_scope` to more functions and using the parent module from it.
Visibility resolution no longer have access to later resolution methods and has to use early resolution, so its diagnostics in case of errors regress slightly.
|
|
Mention that tuple structs are private if any of their fields are
CC #39703
|
|
check against more collisions for TypeId of fn pointer
Cc https://github.com/rust-lang/rfcs/pull/2738#issuecomment-519923318
|
|
More explicit diagnostic when using a `vec![]` in a pattern
```
error: unexpected `(` after qualified path
--> $DIR/vec-macro-in-pattern.rs:3:14
|
LL | Some(vec![x]) => (),
| ^^^^^^^
| |
| unexpected `(` after qualified path
| in this macro invocation
| use a slice pattern here instead
|
= help: for more information, see https://doc.rust-lang.org/edition-guide/rust-2018/slice-patterns.html
= note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
```
Fix #61933.
|
|
Add test for issue 36804
I slightly reduced the repro that ICEs on nightly-2017-01-20.
Closes #36804
|
|
Tweak mismatched types error
- Change expected/found for type mismatches in `break`
- Be more accurate when talking about diverging match arms
- Tweak wording of function without a return value
- Suggest calling bare functions when their return value can be coerced to the expected type
- Give more parsing errors when encountering `foo(_, _, _)`
Fix #51767, fix #62677, fix #63136, cc #37384, cc #35241, cc #51669.
|
|
|
|
|
|
|
|
|
|
```
error: unexpected `(` after qualified path
--> $DIR/vec-macro-in-pattern.rs:3:14
|
LL | Some(vec![x]) => (),
| ^^^^^^^
| |
| unexpected `(` after qualified path
| in this macro invocation
| use a slice pattern here instead
|
= help: for more information, see https://doc.rust-lang.org/edition-guide/rust-2018/slice-patterns.html
= note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fix #62677
|
|
|
|
|
|
|
|
Add tests for some ICEs
Closes #43623
Closes #44405
r? @Centril
|
|
Remove gensym in format_args
This also fixes some things to allow us to export opaque macros from libcore:
* Don't consider items that are only reachable through opaque macros as public/exported (so they aren't linted as needing docs)
* Mark private items reachable from the root of libcore as unstable - they are now reachable (in principle) in other crates via macros in libcore
r? @petrochenkov
|
|
Deprecate `try!` macro
Replaces #62077
Fixes rust-lang/rust-clippy#1361
Fixes #61000
|
|
|
|
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
Co-Authored-By: Oliver Middleton <olliemail27@gmail.com>
|
|
Test interaction between `async { ... }` and `?`, `return`, and `break`
Per the second checkbox in https://github.com/rust-lang/rust/issues/62121#issuecomment-506884048, test that `async { .. }` blocks:
1. do not allow `break` expressions.
2. get targeted by `return` and not the parent function.
3. get targeted by `?` and not the parent function.
Works towards resolving blockers in #63209.
r? @cramertj
|
|
Don't recommend `extern crate` syntax
`extern crate` syntax is not a good recommendation any more, so I've changed it to just print a suggested crate name.
|
|
|
|
|
|
|
|
|
|
Add test for issue 53096
Closes #53096
r? @oli-obk
|
|
Fix ICE #63364
Fixes #63364
r? @estebank cc @varkor
|
|
|
|
|
|
Test conditional initialization validation in async fns
r? @cramertj
Per [paper doc](https://paper.dropbox.com/doc/async.await-Call-for-Tests--AiWF2Nt8tgDiA70qFI~oiLOOAg-nMyZGrra7dz9KcFRMLKJy) calling for async/.await tests, tests are desired for conditionally initialized local variables. This PR hopes to provide tests for that.
#63294 seems to be tracking the items from the paper doc that this PR is related to
#62121 is an open issue asking for more async/.await tests that this relates to
---
:+1: executed 2 new tests
:+1: tidy
|
|
Add tests for some issues
Closes #29265
Closes #37433
Closes #49544
r? @Centril
|
|
Add test for #43398
Closes #43398
|
|
|
|
zackmdavis:minimax_search_and_the_structure_of_cognition, r=varkor
pretty-pretty extremal constants!
(A resurrection of the defunct #57073.)
While many programmers may intuitively appreciate the significance of "magic numbers" like −2147483648, Rust is about empowering everyone to build reliable and efficient software! It's a bit more legible to print the constant names (even noisy fully-qualified-paths thereof).
The bit-manipulation methods mirror those in `librustc_mir::hair::pattern::_match::all_constructors`; thanks to the immortal Varkor for guidance.
Resolves #56393.
r? @varkor
|
|
Fix for "ambiguous associated type" issue with ATBs
Fixes #61752.
r? @nikomatsakis
CC @Centril
|
|
Always error on `SizeOverflow` during mir evaluation
Fix #55878, fix #25116.
r? @oli-obk
|
|
While many programmers may intuitively appreciate the significance of
"magic numbers" like −2147483648, Rust is about empowering everyone to
build reliable and efficient software! It's a bit more legible to
print the constant names (even noisy fully-qualified-paths thereof).
The bit-manipulation methods mirror those in
`librustc_mir::hair::pattern::_match::all_constructors`; thanks to the
immortal Varkor for guidance.
Resolves #56393.
|