Repository navigation
Don't trim path for unsafe_op_in_unsafe_fn lints - #106157
Conversation
|
r=me with FIXME stating that not trimming the path is non-ideal @bors delegate+ |
|
✌️ @LeSeulArtichaut can now approve this pull request |
024a9a3 to
2a7d559
Compare
|
@bors r=compiler-errors |
…mpiler-errors Rollup of 8 pull requests Successful merges: - rust-lang#104748 (Ensure `lld` is supported with `download-ci-llvm`) - rust-lang#105541 (Simplify some iterator combinators) - rust-lang#106045 (default OOM handler: use non-unwinding panic, to match std handler) - rust-lang#106157 (Don't trim path for `unsafe_op_in_unsafe_fn` lints) - rust-lang#106353 (Reduce spans for `unsafe impl` errors) - rust-lang#106381 (Jsondoclint: Add `--verbose` and `--json-output` options) - rust-lang#106411 (rustdoc: remove legacy font-feature-settings CSS) - rust-lang#106414 (Add cuviper to the review rotation for libs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
|
Edit: it does work, see #106157 (comment). Sorry to ping in an old PR, but it does not seem like the regression test works? Compiling the test code with Paste this in bash to see for yourselves: cd $(mktemp -d)
cat >issue-106126.rs <<EOF
#[macro_export]
macro_rules! foo {
() => {
unsafe fn __unsf() {}
unsafe fn __foo() {
__unsf();
}
};
}
EOF
cat >issue-106126-good-path-bug.rs <<EOF
// Regression test for #106126.
// check-pass
// aux-build:issue-106126.rs
#![deny(unsafe_op_in_unsafe_fn)]
#[macro_use]
extern crate issue_106126;
foo!();
fn main() {}
EOF
toolchain=nightly-2022-12-24
rustup install $toolchain --profile minimal
rustc +$toolchain --crate-type lib issue-106126.rs
rustc +$toolchain -L. issue-106126-good-path-bug.rs
# expected: error
# actual: no errorThe reason I care is because this test blocks fixing #112504 which I am working on in #165210 (see #165210 (comment) for the exact CI failure). But since the original reproducer does not seem to work, I can't confirm that fixing that CI failure would still catch a regression of this fix. Unless I am making some silly mistake, the best way forward to unblock #165210 seems to me to be to simply remove the test. |
|
Turns out the test does work, one just has to pass |
Fixes #106126, alternative to #106127.
r? @ghost for now.