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#128378 - matthiaskrgr:rollup-i3qz9uo, r=matth…
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#127574 (elaborate unknowable goals) - rust-lang#128141 (Set branch protection function attributes) - rust-lang#128315 (Fix vita build of std and forbid unsafe in unsafe in the os/vita module) - rust-lang#128339 ([rustdoc] Make the buttons remain when code example is clicked) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
21 changed files
with
268 additions
and
45 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Test that the correct module flags are emitted with different branch protection flags. | ||
|
||
//@ revisions: BTI PACRET LEAF BKEY NONE | ||
//@ needs-llvm-components: aarch64 | ||
//@ [BTI] compile-flags: -Z branch-protection=bti | ||
//@ [PACRET] compile-flags: -Z branch-protection=pac-ret | ||
//@ [LEAF] compile-flags: -Z branch-protection=pac-ret,leaf | ||
//@ [BKEY] compile-flags: -Z branch-protection=pac-ret,b-key | ||
//@ compile-flags: --target aarch64-unknown-linux-gnu | ||
//@ ignore-llvm-version: 19 - 99 | ||
|
||
#![crate_type = "lib"] | ||
#![feature(no_core, lang_items)] | ||
#![no_core] | ||
|
||
#[lang = "sized"] | ||
trait Sized {} | ||
|
||
// A basic test function. | ||
pub fn test() {} | ||
|
||
// BTI: !"branch-target-enforcement", i32 1 | ||
// BTI: !"sign-return-address", i32 0 | ||
// BTI: !"sign-return-address-all", i32 0 | ||
// BTI: !"sign-return-address-with-bkey", i32 0 | ||
|
||
// PACRET: !"branch-target-enforcement", i32 0 | ||
// PACRET: !"sign-return-address", i32 1 | ||
// PACRET: !"sign-return-address-all", i32 0 | ||
// PACRET: !"sign-return-address-with-bkey", i32 0 | ||
|
||
// LEAF: !"branch-target-enforcement", i32 0 | ||
// LEAF: !"sign-return-address", i32 1 | ||
// LEAF: !"sign-return-address-all", i32 1 | ||
// LEAF: !"sign-return-address-with-bkey", i32 0 | ||
|
||
// BKEY: !"branch-target-enforcement", i32 0 | ||
// BKEY: !"sign-return-address", i32 1 | ||
// BKEY: !"sign-return-address-all", i32 0 | ||
// BKEY: !"sign-return-address-with-bkey", i32 1 | ||
|
||
// NONE-NOT: branch-target-enforcement | ||
// NONE-NOT: sign-return-address | ||
// NONE-NOT: sign-return-address-all | ||
// NONE-NOT: sign-return-address-with-bkey |
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,21 @@ | ||
// This test ensures that code blocks buttons are displayed on hover and when you click on them. | ||
go-to: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html" | ||
|
||
// First we check we "hover". | ||
move-cursor-to: ".example-wrap" | ||
assert-css: (".example-wrap .copy-button", { "visibility": "visible" }) | ||
move-cursor-to: ".search-input" | ||
assert-css: (".example-wrap .copy-button", { "visibility": "hidden" }) | ||
|
||
// Now we check the click. | ||
assert-count: (".example-wrap:not(:hover) .button-holder.keep-visible", 0) | ||
click: ".example-wrap" | ||
move-cursor-to: ".search-input" | ||
// It should have a new class and be visible. | ||
wait-for-count: (".example-wrap:not(:hover) .button-holder.keep-visible", 1) | ||
wait-for-css: (".example-wrap:not(:hover) .button-holder.keep-visible", { "visibility": "visible" }) | ||
// Clicking again will remove the class. | ||
click: ".example-wrap" | ||
move-cursor-to: ".search-input" | ||
assert-count: (".example-wrap:not(:hover) .button-holder.keep-visible", 0) | ||
assert-css: (".example-wrap .copy-button", { "visibility": "hidden" }) |
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
13 changes: 13 additions & 0 deletions
13
tests/ui/coherence/super-traits/super-trait-knowable-1.current.stderr
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,13 @@ | ||
error[E0119]: conflicting implementations of trait `Overlap<_>` for type `()` | ||
--> $DIR/super-trait-knowable-1.rs:16:1 | ||
| | ||
LL | impl<T, U: Sub<T>> Overlap<T> for U {} | ||
| ----------------------------------- first implementation here | ||
LL | impl<T> Overlap<T> for () {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `()` | ||
| | ||
= note: downstream crates may implement trait `Sub<_>` for type `()` | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0119`. |
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,19 @@ | ||
// Added in #124532. While `(): Super` is knowable, `(): Sub<?t>` is not. | ||
// | ||
// We therefore elaborate super trait bounds in the implicit negative | ||
// overlap check. | ||
|
||
//@ revisions: current next | ||
//@ ignore-compare-mode-next-solver (explicit revisions) | ||
//@[next] compile-flags: -Znext-solver | ||
//@[next] check-pass | ||
|
||
trait Super {} | ||
trait Sub<T>: Super {} | ||
|
||
trait Overlap<T> {} | ||
impl<T, U: Sub<T>> Overlap<T> for U {} | ||
impl<T> Overlap<T> for () {} | ||
//[current]~^ ERROR conflicting implementations | ||
|
||
fn main() {} |
Oops, something went wrong.