forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#126093 - cuviper:beta-next, r=cuviper
[beta] backports - Fix insufficient logic when searching for the underlying allocation rust-lang#124761 - Handle field projections like slice indexing in invalid_reference_casting rust-lang#124908 - Handle Deref expressions in invalid_reference_casting rust-lang#124978 - Fix ICE in non-operand `aggregate_raw_ptr` instrinsic codegen rust-lang#125184 - Wrap Context.ext in AssertUnwindSafe rust-lang#125392 - Revert problematic opaque type change rust-lang#125489 - ast: Revert a breaking attribute visiting order change rust-lang#125734 - Update to LLVM 18.1.7 rust-lang#126061 r? cuviper
- Loading branch information
Showing
21 changed files
with
458 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule llvm-project
updated
8 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,53 @@ | ||
error: using tabs in doc comments is not recommended | ||
--> tests/ui/tabs_in_doc_comments.rs:6:5 | ||
--> tests/ui/tabs_in_doc_comments.rs:10:9 | ||
| | ||
LL | /// - first one | ||
| ^^^^ help: consider using four spaces per tab | ||
LL | /// - First String: | ||
| ^^^^ help: consider using four spaces per tab | ||
| | ||
= note: `-D clippy::tabs-in-doc-comments` implied by `-D warnings` | ||
= help: to override `-D warnings` add `#[allow(clippy::tabs_in_doc_comments)]` | ||
|
||
error: using tabs in doc comments is not recommended | ||
--> tests/ui/tabs_in_doc_comments.rs:6:13 | ||
--> tests/ui/tabs_in_doc_comments.rs:11:9 | ||
| | ||
LL | /// - first one | ||
| ^^^^^^^^ help: consider using four spaces per tab | ||
LL | /// - needs to be inside here | ||
| ^^^^^^^^ help: consider using four spaces per tab | ||
|
||
error: using tabs in doc comments is not recommended | ||
--> tests/ui/tabs_in_doc_comments.rs:7:5 | ||
--> tests/ui/tabs_in_doc_comments.rs:14:9 | ||
| | ||
LL | /// - second one | ||
| ^^^^ help: consider using four spaces per tab | ||
LL | /// - Second String: | ||
| ^^^^ help: consider using four spaces per tab | ||
|
||
error: using tabs in doc comments is not recommended | ||
--> tests/ui/tabs_in_doc_comments.rs:7:14 | ||
--> tests/ui/tabs_in_doc_comments.rs:15:9 | ||
| | ||
LL | /// - second one | ||
| ^^^^ help: consider using four spaces per tab | ||
LL | /// - needs to be inside here | ||
| ^^^^^^^^ help: consider using four spaces per tab | ||
|
||
error: using tabs in doc comments is not recommended | ||
--> tests/ui/tabs_in_doc_comments.rs:10:9 | ||
--> tests/ui/tabs_in_doc_comments.rs:6:5 | ||
| | ||
LL | /// - First String: | ||
| ^^^^ help: consider using four spaces per tab | ||
LL | /// - first one | ||
| ^^^^ help: consider using four spaces per tab | ||
|
||
error: using tabs in doc comments is not recommended | ||
--> tests/ui/tabs_in_doc_comments.rs:11:9 | ||
--> tests/ui/tabs_in_doc_comments.rs:6:13 | ||
| | ||
LL | /// - needs to be inside here | ||
| ^^^^^^^^ help: consider using four spaces per tab | ||
LL | /// - first one | ||
| ^^^^^^^^ help: consider using four spaces per tab | ||
|
||
error: using tabs in doc comments is not recommended | ||
--> tests/ui/tabs_in_doc_comments.rs:14:9 | ||
--> tests/ui/tabs_in_doc_comments.rs:7:5 | ||
| | ||
LL | /// - Second String: | ||
| ^^^^ help: consider using four spaces per tab | ||
LL | /// - second one | ||
| ^^^^ help: consider using four spaces per tab | ||
|
||
error: using tabs in doc comments is not recommended | ||
--> tests/ui/tabs_in_doc_comments.rs:15:9 | ||
--> tests/ui/tabs_in_doc_comments.rs:7:14 | ||
| | ||
LL | /// - needs to be inside here | ||
| ^^^^^^^^ help: consider using four spaces per tab | ||
LL | /// - second one | ||
| ^^^^ help: consider using four spaces per tab | ||
|
||
error: aborting due to 8 previous errors | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//@ compile-flags: -O -C no-prepopulate-passes -Z mir-enable-passes=-InstSimplify | ||
//@ only-64bit (so I don't need to worry about usize) | ||
|
||
#![crate_type = "lib"] | ||
#![feature(core_intrinsics)] | ||
|
||
use std::intrinsics::aggregate_raw_ptr; | ||
|
||
// InstSimplify replaces these with casts if it can, which means they're almost | ||
// never seen in codegen, but PR#121571 found a way, so add a test for it. | ||
|
||
#[inline(never)] | ||
pub fn opaque(_p: &*const i32) {} | ||
|
||
// CHECK-LABEL: @thin_ptr_via_aggregate( | ||
#[no_mangle] | ||
pub unsafe fn thin_ptr_via_aggregate(p: *const ()) { | ||
// CHECK: %mem = alloca | ||
// CHECK: store ptr %p, ptr %mem | ||
// CHECK: call {{.+}}aggregate_thin_pointer{{.+}} %mem) | ||
let mem = aggregate_raw_ptr(p, ()); | ||
opaque(&mem); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//@ run-pass | ||
// Tests against a regression surfaced by crater in https://github.com/rust-lang/rust/issues/125193 | ||
// Unwind Safety is not a very coherent concept, but we'd prefer no regressions until we kibosh it | ||
// and this is an unstable feature anyways sooo... | ||
|
||
use std::panic::UnwindSafe; | ||
use std::task::Context; | ||
|
||
fn unwind_safe<T: UnwindSafe>() {} | ||
|
||
fn main() { | ||
unwind_safe::<Context<'_>>(); // test UnwindSafe | ||
unwind_safe::<&Context<'_>>(); // test RefUnwindSafe | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#![doc = in_root!()] // FIXME, this is a bug | ||
#![doc = in_mod!()] //~ ERROR cannot find macro `in_mod` in this scope | ||
#![doc = in_mod_escape!()] // FIXME, this is a bug | ||
#![doc = in_block!()] //~ ERROR cannot find macro `in_block` in this scope | ||
|
||
#[doc = in_root!()] //~ ERROR cannot find macro `in_root` in this scope | ||
#[doc = in_mod!()] //~ ERROR cannot find macro `in_mod` in this scope | ||
#[doc = in_mod_escape!()] //~ ERROR cannot find macro `in_mod_escape` in this scope | ||
#[doc = in_block!()] //~ ERROR cannot find macro `in_block` in this scope | ||
fn before() { | ||
#![doc = in_root!()] //~ ERROR cannot find macro `in_root` in this scope | ||
#![doc = in_mod!()] //~ ERROR cannot find macro `in_mod` in this scope | ||
#![doc = in_mod_escape!()] //~ ERROR cannot find macro `in_mod_escape` in this scope | ||
#![doc = in_block!()] //~ ERROR cannot find macro `in_block` in this scope | ||
} | ||
|
||
macro_rules! in_root { () => { "" } } | ||
|
||
mod macros_stay { | ||
#![doc = in_mod!()] // FIXME, this is a bug | ||
|
||
macro_rules! in_mod { () => { "" } } | ||
|
||
#[doc = in_mod!()] // OK | ||
fn f() { | ||
#![doc = in_mod!()] // OK | ||
} | ||
} | ||
|
||
#[macro_use] | ||
mod macros_escape { | ||
#![doc = in_mod_escape!()] // FIXME, this is a bug | ||
|
||
macro_rules! in_mod_escape { () => { "" } } | ||
|
||
#[doc = in_mod_escape!()] // OK | ||
fn f() { | ||
#![doc = in_mod_escape!()] // OK | ||
} | ||
} | ||
|
||
fn block() { | ||
#![doc = in_block!()] //~ ERROR cannot find macro `in_block` in this scope | ||
|
||
macro_rules! in_block { () => { "" } } | ||
|
||
#[doc = in_block!()] // OK | ||
fn f() { | ||
#![doc = in_block!()] // OK | ||
} | ||
} | ||
|
||
#[doc = in_root!()] // OK | ||
#[doc = in_mod!()] //~ ERROR cannot find macro `in_mod` in this scope | ||
#[doc = in_mod_escape!()] // OK | ||
#[doc = in_block!()] //~ ERROR cannot find macro `in_block` in this scope | ||
fn after() { | ||
#![doc = in_root!()] // OK | ||
#![doc = in_mod!()] //~ ERROR cannot find macro `in_mod` in this scope | ||
#![doc = in_mod_escape!()] // OK | ||
#![doc = in_block!()] //~ ERROR cannot find macro `in_block` in this scope | ||
} | ||
|
||
fn main() {} |
Oops, something went wrong.