| Age | Commit message (Collapse) | Author | Lines |
|
|
|
This reverts commit e90985acdec9928da9f6d157cfeb64f0ee98bffe.
|
|
[beta] back out #53793 - stabilize outlives requirements
Fixes #54467 for beta, looks like a less risky fix than #54701
|
|
|
|
This reverts commit 6810f5286b6b91daab06fc3dccb27d8c46f14349, reversing
changes made to 8586ec6980462c99a8926646201b2444d8938d29.
|
|
|
|
[beta] Cancel warning for tool_lints
For the discussion about this, see: rust-lang-nursery/rust-clippy#3159
`clippy-preview` is available on stable since 1.29. So when running `cargo +beta clippy` on a crate with `#![allow(clippy_lint)]` a warning is produced, which tells the programmer to change this to `#![allow(clippy::clippy_lint)]`. But since `tool_lints` aren't stable yet, this would require a `#![feature(tool_lints)]`. Features aren't available on stable or beta, so we cannot do this. Even wrapping `cfg_attr(clippy)` around this won't help, since Clippy can also be run from stable or beta toolchain.
r? @Manishearth
|
|
Before this two macros with same name would be indistinguishable inside a
`FileName`. This caused a bug in incremental compilation (see #53097) since
two different macros would map out to the same `StableFilemapId`.
Fixes #53097.
|
|
|
|
editions.
|
|
|
|
Make rustc::middle::region::Scope's fields public
This PR makes the following changes to `rustc::middle::region::Scope`:
- [x] Makes `region::Scope`'s fields public
- [x] Removes the `impl Scope` block with constructors (as per [this comment](https://github.com/rust-lang/rust/pull/54032#discussion_r216618208))
- [x] Updates call sites throughout the compiler
Closes #54122.
|
|
|
|
|
|
|
|
A few cleanups for hir
- prefer `if let` to `match` when only 1 branch matters
- `chain` iterable items that are looped over in sequence
- `sort_by_key` instead of `sort_by` when possible
- change cloning `map`s to `cloned()`
- use `unwrap_or_else` and `ok` when applicable
- a few other minor readability improvements
- whitespace fixes
|
|
Add forever unstable attribute to allow specifying arbitrary scalar ranges
r? @eddyb for the first commit and @nikomatsakis for the second one
|
|
Suggest valid crate type if invalid crate type is found
This adds a suggestion to the `invalid_crate_types` lint.
The suggestion is based on the Levenshtein distance to existing crate
types. If no suggestion is found it will show the lint without any
suggestions.
Closes #53958
|
|
Rename all mentions of `nil` to `unit`
Fixes #53719.
Renamed keywords nil to unit.
|
|
Implement RFC 2302: tuple_struct_self_ctor
Tracking issue: https://github.com/rust-lang/rust/issues/51994
|
|
This adds a suggestion to the `invalid_crate_types` lint.
The suggestion is based on the Levenshtein distance to existing crate
types. If no suggestion is found it will show the lint without any
suggestions.
|
|
Allow for opting out of ThinLTO and clean up LTO related cli flag handling.
It turns out that there currently is no way to explicitly disable ThinLTO (except for the nightly-only `-Zthinlto` flag). This PR extends `-C lto` to take `yes` and `no` in addition to `thin` and `fat`. It should be backwards compatible.
It also cleans up how LTO mode selection is handled.
Note that merging the PR in the current state would make the new values for `-C lto` available on the stable channel. I think that would be fine but maybe some team should vote on it.
|
|
|
|
Really make CGU names unique across crates.
This will hopefully fix issue #53794.
r? @alexcrichton
|
|
|
|
|
|
stabilize outlives requirements
https://github.com/rust-lang/rust/issues/44493
r? @nikomatsakis
|
|
|
|
Reexport CheckLintNameResult
Make the enum `CheckLintNameResult` public, so that lint tools (aka Clippy) can use it together with [`LintStore::check_lint_name`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc/lint/struct.LintStore.html#method.check_lint_name), to handle the case that a scoped `tool_lint` doesn't exist in the tool.
This is currently not handled by the compiler:
https://github.com/rust-lang/rust/blob/595345419d12c3ea860151df52f78744a31bafff/src/librustc/lint/levels.rs#L309-L314
Needed for rust-lang-nursery/rust-clippy#3161
r? @Manishearth
|
|
simplify ordering for Kind
Missed from https://github.com/rust-lang/rust/pull/50930
r? @eddyb
|
|
nikomatsakis:nll-universe-subtyping-and-pattern-ascription, r=pnkfelix
support ascription for patterns in NLL
This implements the strategy outlined in [this comment](https://github.com/rust-lang/rust/issues/47184#issuecomment-416669986):
- We first extend the NLL subtyping code so it can handle inference variables and subtyping.
- Then we extend HAIR patterns with type ascription.
- Then we treat the type `T` in `let pat: T = ...` as an ascription.
Before landing, a few things:
- [x] Fix the WF rule bug (filed a FIXME https://github.com/rust-lang/rust/issues/54105)
- [x] Fix an ICE I encountered locally around bound regions, or else file a follow-up
- [x] More tests probably =)
r? @pnkfelix
|
|
Co-authored-by: nikomatsakis
|
|
|
|
|
|
This reverts commit d02a5ffaed9c395ae62ee12d0f4e04946c62edb1.
|
|
This reverts commit 37d0600c23ba1890346078bd7f310e15915417b2.
|
|
This reverts commit 6f685ffad42a2d12dd1fad5ccb0471e7fa260826.
|
|
This reverts commit 2be5c722dedf50a95479bad0b4558e5e76a73a00.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|