-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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 #64868 - Centril:rollup-dheyb22, r=Centril
Rollup of 6 pull requests Successful merges: - #64455 (Add Long error explanation for E0531) - #64546 (Bugfix/rfc 2451 rerebalance tests) - #64589 (Differentiate AArch64 bare-metal targets between hf and non-hf.) - #64763 (Add E0734 and its long explanation) - #64793 (Fix format macro expansions spans to be macro-generated) - #64799 (Fix double panic when printing query stack during an ICE) Failed merges: r? @ghost
- Loading branch information
Showing
58 changed files
with
700 additions
and
71 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
37 changes: 37 additions & 0 deletions
37
src/librustc_target/spec/aarch64_unknown_none_softfloat.rs
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,37 @@ | ||
// Generic AArch64 target for bare-metal code - Floating point disabled | ||
// | ||
// Can be used in conjunction with the `target-feature` and | ||
// `target-cpu` compiler flags to opt-in more hardware-specific | ||
// features. | ||
// | ||
// For example, `-C target-cpu=cortex-a53`. | ||
|
||
use super::{LldFlavor, LinkerFlavor, Target, TargetOptions, PanicStrategy}; | ||
|
||
pub fn target() -> Result<Target, String> { | ||
let opts = TargetOptions { | ||
linker: Some("rust-lld".to_owned()), | ||
features: "+strict-align,-neon,-fp-armv8".to_string(), | ||
executables: true, | ||
relocation_model: "static".to_string(), | ||
disable_redzone: true, | ||
linker_is_gnu: true, | ||
max_atomic_width: Some(128), | ||
panic_strategy: PanicStrategy::Abort, | ||
abi_blacklist: super::arm_base::abi_blacklist(), | ||
.. Default::default() | ||
}; | ||
Ok(Target { | ||
llvm_target: "aarch64-unknown-none".to_string(), | ||
target_endian: "little".to_string(), | ||
target_pointer_width: "64".to_string(), | ||
target_c_int_width: "32".to_string(), | ||
target_os: "none".to_string(), | ||
target_env: String::new(), | ||
target_vendor: String::new(), | ||
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), | ||
arch: "aarch64".to_string(), | ||
linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), | ||
options: opts, | ||
}) | ||
} |
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
17 changes: 17 additions & 0 deletions
17
src/test/ui/coherence/impl-foreign[foreign]-for-foreign.rs
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,17 @@ | ||
#![feature(re_rebalance_coherence)] | ||
|
||
// compile-flags:--crate-name=test | ||
// aux-build:coherence_lib.rs | ||
|
||
extern crate coherence_lib as lib; | ||
use lib::*; | ||
use std::rc::Rc; | ||
|
||
struct Local; | ||
|
||
impl Remote1<u32> for f64 { | ||
//~^ ERROR only traits defined in the current crate | ||
// | can be implemented for arbitrary types [E0117] | ||
} | ||
|
||
fn main() {} |
12 changes: 12 additions & 0 deletions
12
src/test/ui/coherence/impl-foreign[foreign]-for-foreign.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,12 @@ | ||
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types | ||
--> $DIR/impl-foreign[foreign]-for-foreign.rs:12:1 | ||
| | ||
LL | impl Remote1<u32> for f64 { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | ||
| | ||
= note: the impl does not reference only types defined in this crate | ||
= note: define and implement a trait or new type instead | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0117`. |
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,16 @@ | ||
#![feature(re_rebalance_coherence)] | ||
|
||
// compile-flags:--crate-name=test | ||
// aux-build:coherence_lib.rs | ||
// check-pass | ||
|
||
extern crate coherence_lib as lib; | ||
use lib::*; | ||
use std::rc::Rc; | ||
|
||
struct Local; | ||
|
||
impl Remote1<u32> for Local { | ||
} | ||
|
||
fn main() {} |
14 changes: 14 additions & 0 deletions
14
src/test/ui/coherence/impl[t]-foreign[foreign[t]_local]-for-foreign.rs
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 @@ | ||
#![feature(re_rebalance_coherence)] | ||
|
||
// check-pass | ||
// compile-flags:--crate-name=test | ||
// aux-build:coherence_lib.rs | ||
|
||
extern crate coherence_lib as lib; | ||
use lib::*; | ||
use std::rc::Rc; | ||
|
||
struct Local; | ||
impl<T> Remote2<Rc<T>, Local> for usize { } | ||
|
||
fn main() {} |
20 changes: 20 additions & 0 deletions
20
src/test/ui/coherence/impl[t]-foreign[foreign]-for-fundamental[t].rs
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,20 @@ | ||
#![feature(re_rebalance_coherence)] | ||
|
||
// compile-flags:--crate-name=test | ||
// aux-build:coherence_lib.rs | ||
|
||
extern crate coherence_lib as lib; | ||
use lib::*; | ||
use std::rc::Rc; | ||
|
||
struct Local; | ||
|
||
impl<T> Remote1<u32> for Box<T> { | ||
//~^ ERROR type parameter `T` must be used as the type parameter for some local type | ||
} | ||
|
||
impl<'a, T> Remote1<u32> for &'a T { | ||
//~^ ERROR type parameter `T` must be used as the type parameter for some local type | ||
} | ||
|
||
fn main() {} |
19 changes: 19 additions & 0 deletions
19
src/test/ui/coherence/impl[t]-foreign[foreign]-for-fundamental[t].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,19 @@ | ||
error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) | ||
--> $DIR/impl[t]-foreign[foreign]-for-fundamental[t].rs:12:1 | ||
| | ||
LL | impl<T> Remote1<u32> for Box<T> { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type parameter `T` must be used as the type parameter for some local type | ||
| | ||
= note: only traits defined in the current crate can be implemented for a type parameter | ||
|
||
error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) | ||
--> $DIR/impl[t]-foreign[foreign]-for-fundamental[t].rs:16:1 | ||
| | ||
LL | impl<'a, T> Remote1<u32> for &'a T { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type parameter `T` must be used as the type parameter for some local type | ||
| | ||
= note: only traits defined in the current crate can be implemented for a type parameter | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0210`. |
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,16 @@ | ||
#![feature(re_rebalance_coherence)] | ||
|
||
// compile-flags:--crate-name=test | ||
// aux-build:coherence_lib.rs | ||
|
||
extern crate coherence_lib as lib; | ||
use lib::*; | ||
use std::rc::Rc; | ||
|
||
struct Local; | ||
|
||
impl<T> Remote1<u32> for T { | ||
//~^ ERROR type parameter `T` must be used as the type parameter for some local type | ||
} | ||
|
||
fn main() {} |
11 changes: 11 additions & 0 deletions
11
src/test/ui/coherence/impl[t]-foreign[foreign]-for-t.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,11 @@ | ||
error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) | ||
--> $DIR/impl[t]-foreign[foreign]-for-t.rs:12:1 | ||
| | ||
LL | impl<T> Remote1<u32> for T { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ type parameter `T` must be used as the type parameter for some local type | ||
| | ||
= note: only traits defined in the current crate can be implemented for a type parameter | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0210`. |
Oops, something went wrong.