| Age | Commit message (Collapse) | Author | Lines |
|
|
|
This would have avoided a bug in https://github.com/rust-lang/rust/pull/104860.
In practice this shouldn't matter since nothing uses the query other than the `dead_code` lint,
but this isn't documented as an internal-only query so it seems nice for it to be accurate.
I think for `dead_code` it doesn't matter because the relevant code is generated by `rustc_builtin_macros` and isn't linted.
|
|
|
|
Retag as FnEntry on `drop_in_place`
This commit changes the mir drop shim to always retag its argument as if it were a `&mut`.
cc rust-lang/unsafe-code-guidelines#373
|
|
|
|
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
|
|
Rollup of 8 pull requests
Successful merges:
- #104741 (Switch `#[track_caller]` back to a no-op unless feature gate is enabled)
- #105769 (add function to tell the identical errors for ambiguity_errors)
- #105843 (Suggest associated const on possible capitalization mistake)
- #105966 (Re-enable `Fn` trait call notation error for non-tuple argument)
- #106002 (codegen tests: adapt patterns to also work with v0 symbol mangling)
- #106010 (Give opaque types a better coherence error)
- #106016 (rustdoc: simplify link anchor to section expand JS)
- #106024 (Fix ICE due to `todo!()` in `rustdoc` for `Term`s)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
Fix ICE due to `todo!()` in `rustdoc` for `Term`s
Left a todo awhile ago (I think), so fill it in to print a const for `Term`s.
Fixes #105952.
Should I add some annotations to the rustdoc test?
|
|
Give opaque types a better coherence error
|
|
codegen tests: adapt patterns to also work with v0 symbol mangling
No functional changes intended.
These tests were failing under `new-symbol-mangling = true`, cf. https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/a.20few.20panic-abort.20tests.20fail.20under.20.60new-symbol-mangling.60.
This adapts the patterns to work in this case.
|
|
Re-enable `Fn` trait call notation error for non-tuple argument
I have no idea why I delayed this bug... but also there doesn't seem to be a UI test that actually shows a change, so maybe that's why.
Fixes #105936
|
|
Suggest associated const on possible capitalization mistake
Suggest `i32::MAX` if we typed `i32::max` without making a function call.
Fixes #93844
|
|
add function to tell the identical errors for ambiguity_errors
if 2 errors of the kind and ident and span of the ident, b1, b2 and misc1 misc2 are the same we call these 2 ambiguity errors identical
prevent identical ambiguity error from pushing into vector of ambiguity_errors this will fix #105177
|
|
r=compiler-errors
Switch `#[track_caller]` back to a no-op unless feature gate is enabled
This patch fixes a regression, in which `#[track_caller]`, which was previously a no-op, was changed to actually turn on the behavior. This should instead only happen behind the `closure_track_caller` feature gate.
Also, add a warning for the user to understand how their code will compile depending on the feature gate being turned on or not.
Fixes #104588
|
|
Fix impl block in const expr
Fixes #83026.
The problem was that we didn't visit block expressions. Considering how big the [walk_expr](https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_hir/intravisit.rs.html#678) function is, I decided to instead implement the `hir` visitor on the struct. It also answers the question which was in a comment for `RustdocVisitor`: we should have used a visitor instead of our ad-hoc implementation.
Adding this visitor also added some extra checks that weren't present before (check changes in `rustdoc-ui` tests).
r? `@notriddle`
|
|
|
|
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
|
|
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
|
|
Rollup of 6 pull requests
Successful merges:
- #105837 (Don't ICE in `check_must_not_suspend_ty` for mismatched tuple arity)
- #105932 (Correct branch-protection ModFlagBehavior for Aarch64 on LLVM-15)
- #105960 (Various cleanups)
- #105985 (Method chain nitpicks)
- #105996 (Test that async blocks are `UnwindSafe`)
- #106012 (Clarify that raw retags are not permitted in Mir)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
Rollup of 8 pull requests
Successful merges:
- #105584 (add assert messages if chunks/windows are length 0)
- #105602 (interpret: add read_machine_[ui]size convenience methods)
- #105824 (str.lines() docstring: clarify that line endings are not returned)
- #105980 (Refer to "Waker" rather than "RawWaker" in `drop` comment)
- #105986 (Fix typo in reading_half_a_pointer.rs)
- #105995 (Add regression test for #96530)
- #106008 (Sort lint_groups in no_lint_suggestion)
- #106014 (Add comment explaining what the scrape-examples-toggle.goml GUI test is about)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Left a todo awhile ago (I think), so fill it in to print a const for `Term`s.
|
|
This gets rid of the more-scraped-examples-inner wrapper, instead nesting the
children directly and using absolute positioning for the toggle line.
|
|
Clarify that raw retags are not permitted in Mir
Not sure when this changed, but documentation and the validator needed to be updated. This also removes raw retags from custom mir.
cc rust-lang/miri#2735
r? `@RalfJung`
|
|
Test that async blocks are `UnwindSafe`
This was a regression from the reverted #105250 which is now covered by a test.
|
|
Method chain nitpicks
Just fixing some little things I didn't see in review from that method chain PR.
r? `@estebank`
|
|
Don't ICE in `check_must_not_suspend_ty` for mismatched tuple arity
These expressions are just used for their spans, so make it best-effort here.
Fixes #105728
|
|
GuillaumeGomez:add-gui-explanations-scrape-examples-toggle, r=notriddle
Add comment explaining what the scrape-examples-toggle.goml GUI test is about
r? `@notriddle`
|
|
Add regression test for #96530
Closes #96530
r? `@compiler-errors`
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
|
|
|
|
Rename `assert_uninit_valid` intrinsic
It's not about "uninit" anymore but about "filling with 0x01 bytes" so the name should at least try to reflect that.
This is actually not fully correct though, as it does still panic for all uninit with `-Zstrict-init-checks`. I'm not sure what the best way is to deal with that not causing confusion. I guess we could just remove the flag? I don't think having it makes a lot of sense anymore with the direction that we have chose to go. It could be relevant again if #100423 lands so removing it may be a bit over eager.
r? `@RalfJung`
|
|
|
|
Rollup of 8 pull requests
Successful merges:
- #105791 (docs: add long error explanation for error E0472)
- #105897 (Fix an opaque type ICE)
- #105904 (Fix arch flag on i686-apple-darwin)
- #105949 (Bump `cfg-if` to `1.0` in rustc crates)
- #105964 (rustdoc: prevent CSS layout of line numbers shrinking into nothing)
- #105972 (rustdoc: simplify section anchor CSS)
- #105973 (Avoid going through the happy path in case of non-fn builtin calls)
- #105976 (Remove unused `check-stage2-T-arm-linux-androideabi-H-x86_64-unknown-linux-gnu` make rule)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
|
|
|
|
|
|
Add `-Zno-jump-tables`
This flag mimics GCC/Clang's `-fno-jump-tables` [1][2], which makes the codegen backend avoid generating jump tables when lowering switches.
In the case of LLVM, the `"no-jump-tables"="true"` function attribute is added to every function.
The kernel currently needs it for x86 when enabling IBT [3], as well as for Alpha (plus VDSO objects in MIPS/LoongArch).
[1] https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#index-fno-jump-tables
[2] https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fjump-tables
[3] https://github.com/torvalds/linux/blob/v6.1/arch/x86/Makefile#L75-L83
|
|
No functional changes intended.
These tests were failing under `new-symbol-mangling = true`.
This adapts the patterns to work in this case.
|
|
This was a regression from the reverted #105250 which is now covered by a test.
|
|
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
|
|
|
|
|
|
This patch improves the readability of some of the code by using
if-let-chains. Also, make use of the `add_feature_diagnostics` function.
|
|
|
|
|
|
This patch does the following:
- Refactor some repeated lines into a single one
- Split the `ungated_async_fn_caller` lint into multiple lines, and make
one of those lines only print out on nightly
- Use test revisions instead of copying an existing test
|
|
This patch fixes a regression, in which `#[track_caller]`, which was
previously a no-op, was changed to actually turn on the behavior. This
should instead only happen behind the `closure_track_caller` feature
gate.
Also, add a warning for the user to understand how their code will
compile depending on the feature gate being turned on or not.
Fixes #104588
|
|
r=GuillaumeGomez
rustdoc: prevent CSS layout of line numbers shrinking into nothing
Before:

After:

|