| Age | Commit message (Collapse) | Author | Lines |
|
- The attribute is behind a feature gate.
- Error if both #[naked] and #[track_caller] are applied to the same function.
- Error if #[track_caller] is applied to a non-function item.
- Error if ABI is not "rust"
- Error if #[track_caller] is applied to a trait function.
Error codes and descriptions are pending.
|
|
|
|
|
|
|
|
Add some tests for macros in extern blocks, remove duplicate tests
|
|
Add E0734 and its long explanation
Part of https://github.com/rust-lang/rust/issues/61137
|
|
|
|
|
|
|
|
|
|
feature_gate: Remove dead code from attribute checking
https://github.com/rust-lang/rust/pull/63468 is merged, so all attributes go through name resolution now, so we can remove code that previously performed some checks for attributes not going through resolution.
|
|
|
|
Intrinsics can only be defined by the compiler.
|
|
Resolve attributes in several places
Resolve attributes for Arm, Field, FieldPat, GenericParam, Param, StructField and Variant.
This PR is based on @petrochenkov work located at https://github.com/petrochenkov/rust/commit/83fdb8d598c1a871d40b21faed64ee698b74f814.
|
|
Arm, Field, FieldPat, GenericParam, Param, StructField and Variant
|
|
Replace "feature gated" wording with "unstable".
|
|
|
|
Support "soft" feature-gating using a lint
Use it for feature-gating `#[bench]`.
Closes https://github.com/rust-lang/rust/issues/63798.
|
|
|
|
Use it for feature-gating `#[bench]`
|
|
|
|
|
|
|
|
|
|
Traces already contain module info without that.
It's easy to forget to call `finalize_*` on a module.
In particular, macros enum and trait modules weren't finalized.
By happy accident macros weren't placed into those modules until now.
|
|
|
|
|
|
|
|
Update `impl Trait` gate issues
cc https://github.com/rust-lang/rust/issues/63065
cc https://github.com/rust-lang/rust/issues/63063
r? @varkor cc @alexreg
|
|
cleanup: Remove some language features related to built-in macros
They are now library features.
Cleanup after https://github.com/rust-lang/rust/pull/62086.
The unstable book files are moved because tidy complained.
|
|
|
|
They are now library features.
|
|
|
|
|
|
UI tests now run on asmjs-unknown-emscripten, ignore tests with inline assembly which is not supported on emscripten targets
|
|
|
|
Polonius: fix some cases of `killed` fact generation, and most of the `ui` test suite
Since basic Polonius functionality was re-enabled by @matthewjasper in #54468, some tests were still failing in the polonius compare-mode.
This PR fixes all but one test in the `ui` suite by:
- fixing some bugs in the fact generation code, related to the `killed` relation: Polonius would incorrectly reject some NLL-accepted code, because of these missing `killed` facts.
- ignoring some tests in the polonius compare-mode: a lot of those manually test the NLL or migrate mode, and the failures were mostly artifacts of the test revisions, e.g. that `-Z polonius` requires full NLLs. Some others were also both failing with NLL and succeeding with Polonius, which we can't encode in tests at the moment.
- blessing the output of some tests: whenever Polonius and NLL have basically the same errors, except for diagnostics differences, the Polonius output is blessed. Whenever we've advanced into a less experimental phase, we'll want to revisit these cases (much like we did on the NLL test suite last year) to specifically work on diagnostics.
Fact generation changes:
- we now kill loans on the destination place of `Call` terminators
- we now kill loans on the locals destroyed by `StorageDead`
- we now also handle assignments to projections: killing the loans on a either a deref-ed local, or the ones whose `borrowed_place` conflicts with the current place.
One failing test remains: an overflow during fact generation, on a case of polymorphic recursion (and which I'll continue investigating later).
This adds some tests for the fact generation changes, with some simple Polonius cases similar to the existing smoke tests, but also for some cases encountered in the wild (in the `rand` crate for example).
A more detailed write-up is available [here](https://hackmd.io/CjYB0fs4Q9CweyeTdKWyEg?view) with an explanation for each test failure, the steps taken to resolve it (as a commit in the current PR), NLL and Polonius outputs (and diff), etc.
Since they've worked on this before, and we've discussed some of these failures together:
r? @matthewjasper
|
|
https://github.com/rust-lang/rust/issues/60532
|
|
This is a test about turning the NLL feature gate on, ignored by the NLL compare-mode.
|
|
https://github.com/rust-lang/rust/issues/60532
|
|
resolve: Improve candidate search for unresolved macro suggestions
Use same scope visiting machinery for both collecting suggestion candidates and actually resolving the names.
The PR is better read in per-commit fashion with whitespace changes ignored (the first commit in particular moves some code around).
This should be the last pre-requisite for https://github.com/rust-lang/rust/pull/62086.
r? @davidtwco
|
|
rustc/rustc_mir: Implement RFC 2203.
This PR implements RFC 2203, allowing constants in array repeat
expressions. Part of #49147.
r? @eddyb
|
|
fakenine:normalize_use_of_backticks_compiler_messages_p7, r=alexreg
normalize use of backticks in compiler messages for librustc/lint
https://github.com/rust-lang/rust/issues/60532
|
|
Update the help message on error for self type
Fix #62609
|
|
Normally `#![feature(...)]` shouldn't change behavior, but custom attributes in particular are in the process of retirement, and we should not produce a message telling to enable them.
It also helps with unifying diagnostics for unresolved macros.
|
|
https://github.com/rust-lang/rust/issues/60532
|
|
|
|
|
|
|
|
Therefore we also remove `#[unsafe_destructor_blind_to_params]`
attribute completly.
|