| Age | Commit message (Collapse) | Author | Lines |
|
tests encoding current behavior for various cases of "binding" to _.
The `_` binding form is special, in that it encodes a "no-op": nothing is actually bound, and thus nothing is moved or borrowed in this scenario. Usually we do the "right" thing in all such cases. The exceptions are explicitly pointed out in this test case, so that we keep track of whether they are eventually fixed.
Cc #53114.
(This does not close the aforementioned issue; it just adds the tests encoding the current behavior, which we hope to eventually fix.)
|
|
Rollup of 9 pull requests
Successful merges:
- #69745 (Use `PredicateObligation`s instead of `Predicate`s)
- #70938 (Add ThreadSanitizer test case)
- #70973 (Use forward traversal for unconditional recursion lint)
- #70978 (compiletest: let config flags overwrite -A unused)
- #70979 (Follow up on BTreeMap comments)
- #70981 (Rearrange BTreeMap::into_iter to match range_mut.)
- #70985 (Clean up E0512 explanation)
- #70988 (Setup the `@rustbot prioritize` command)
- #70991 (fix rustc-dev-guide's url in src/librustc_codegen_ssa)
Failed merges:
r? @ghost
|
|
|
|
Add ThreadSanitizer test case
|
|
Use `PredicateObligation`s instead of `Predicate`s
Keep more information about trait binding failures. Use more specific spans by pointing at bindings that introduce obligations.
Subset of #69709.
r? @eddyb
|
|
Stop explicitly depending on python 2
This PR revises our previous policy of officially only supporting and testing with python 2 in the CI environment to instead test with python 3. It also changes the defaults to python 3 in our various scripts (usually, by way of `python` rather than `python3` to preserve compatibility with systems that do not have a python 3 available).
The effect of this is that we expect all new patches to support python 3 (and will test as such). We explicitly also expect that patches support python 2.7 as well -- and test as such, though only on one builder. This is intended as a temporary, though likely long-lived, measure to preserve compatibility while looking towards the future which is likely to be a python 3 only world. We do not at this point set a timeline for when we'll drop support for python 2.7; it's plausible that this is months or years into the future, depending on how quickly the ecosystem drops support and how painful it is for us to maintain that support over time.
Closes #65063 (as far as I can tell; please file explicit and separate issues or PRs if not).
|
|
|
|
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
|
|
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
|
|
The `_` binding form is special, in that it encodes a "no-op": nothing is
actually bound, and thus nothing is moved or borrowed in this scenario. Usually
we do the "right" thing in all such cases. The exceptions are explicitly pointed
out in this test case, so that we keep track of whether they are eventually
fixed.
|
|
|
|
|
|
Replace "rc"/"arc" lang items with Rc/Arc diagnostic items.
`Rc`/`Arc` should have no special semantics, so it seems appropriate for them to not be lang items.
r? @matthewjasper
|
|
r=matthewjasper
Consider methods on fundamental `impl` when method is not found on numeric type
Fix #47759.
|
|
Fix #47759.
|
|
Add two const generics regression tests
Closes https://github.com/rust-lang/rust/issues/66596.
Closes https://github.com/rust-lang/rust/issues/61522.
|
|
|
|
|
|
rustc_session: forbid lints override regardless of position
Addresses the regression reported in #70819 for command line arguments, but does not address the source code flag regression.
|
|
Support `#[track_caller]` on functions in `extern "Rust" { ... }`
Fixes https://github.com/rust-lang/rust/issues/70830 which is the follow-up to @eddyb's suggestion in https://github.com/rust-lang/rust/pull/69251#discussion_r380791634 to allow `#[track_caller]` on `fn`s in FFI imports, that is, on functions in `extern "Rust" { ... }` blocks.
This requires that the other side, the FFI export, also have the `#[track_caller]` attribute. Otherwise, undefined behavior is triggered and the blame lies, as usual, with the `unsafe { ... }` block which called the FFI imported function.
After this PR, all forms of `fn` items with the right ABI (`"Rust"`) support `#[track_caller]`.
As a drive-by, the PR also hardens the check rejecting `#[naked] #[track_caller]` such that methods and other forms of `fn` items are also considered.
r? @eddyb
cc @rust-lang/lang
|
|
r=ecstatic-morse
Don't lint for self-recursion when the function can diverge
Fixes https://github.com/rust-lang/rust/issues/54444
|
|
save/restore `pessimistic_yield` when entering bodies
This flag is used to make the execution order around `+=` operators
pessimistic. Failure to save/restore the flag was causing independent
async blocks to effect one another, leading to strange ICEs and failed
assumptions.
Fixes #69307
r? @Zoxc
|
|
|
|
Rollup of 7 pull requests
Successful merges:
- #70134 (add basic support of OsStrExt for HermitCore)
- #70565 (Add inline attributes for functions used in the query system)
- #70828 (rustdoc: Don't try to load source files from external crates)
- #70870 (Fix abuses of tykind::err)
- #70906 (Suggest move for closures and async blocks in more cases.)
- #70912 (Do not suggest adding type param when `use` is already suggested)
- #70930 (add tracking issue to `VecDeque::make_contiguous`)
Failed merges:
r? @ghost
|
|
|
|
Keep more information about trait binding failures.
|
|
Do not suggest adding type param when `use` is already suggested
Fix #70365, cc #70572.
|
|
Suggest move for closures and async blocks in more cases.
Fixes #66107, also improves #67577
Related PR https://github.com/rust-lang/rust/pull/65166
|
|
rustdoc: Don't try to load source files from external crates
Local items defined in external macros shouldn't generate rendered source files and should link to the external crate's docs instead.
Part of #70757
r? @GuillaumeGomez
cc @eddyb
|
|
--bless all mir-opt tests.
r? @oli-obk
|
|
|
|
Local items defined in external macros shouldn't generate rendered source files and should link to the external crate's docs instead.
|
|
remove false positives of unused_braces
fixes #70717
We could potentially be more aggressive when linting let bindings by checking if there are any explicit `ref`s.
I have been unable to create a snippet which compiles when using braces but has a borrowck error
without them. The closes I've gotten is [the following (playground)](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=4a1552ebe9648cb13fcb8dd969189a6c).
r? @eddyb
|
|
|
|
|
|
|
|
|
|
Fix #70365, cc #70572.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Don't import integer and float modules, use assoc consts 2
Follow up to #70777. I missed quite a lot of places. Partially because I wanted to keep the size of the last PR down, and partially because my regexes were not good enough :)
r? @dtolnay
|
|
Keep codegen units unmerged when building compiler builtins
Make it possible to control how mono items are partitioned into code generation
units, when compiling the compiler builtins, by retaining the original partitioning.
Helps with #48625, #61063, #67960, #70489.
r? @alexcrichton
|
|
ty/walk: iterate `GenericArg`s instead of `Ty`s.
Before this PR, `Ty::walk` only iterated over `Ty`s, but that's becoming an increasing problem with `const` generics, as `ty::Const`s in `Substs` are missed by it.
By working with `GenericArg` instead, we can handle both `Ty`s and `ty::Const`s, but also `ty::Region`s, which used to require ad-hoc mechanisms such as `push_regions`.
I've also removed `TraitRef::input_types`, as it's both long obsolete, and easy to misuse.
|
|
|
|
|
|
|