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#119263 - matthiaskrgr:rollup-zxok9fb, r=matth…
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#112936 (Add illumos aarch64 target for rust.) - rust-lang#119153 (stabilize `file_create_new`) - rust-lang#119246 ([rustdoc] Add `is_object_safe` information for traits in JSON output) - rust-lang#119254 (Remove an unused diagnostic struct) - rust-lang#119255 (add a test for ICE rust-lang#112822) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
11 changed files
with
81 additions
and
14 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
19 changes: 19 additions & 0 deletions
19
compiler/rustc_target/src/spec/targets/aarch64_unknown_illumos.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,19 @@ | ||
use crate::spec::{base, Cc, LinkerFlavor, SanitizerSet, Target}; | ||
|
||
pub fn target() -> Target { | ||
let mut base = base::illumos::opts(); | ||
base.add_pre_link_args(LinkerFlavor::Unix(Cc::Yes), &["-std=c99"]); | ||
base.max_atomic_width = Some(128); | ||
base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::CFI; | ||
base.features = "+v8a".into(); | ||
|
||
Target { | ||
// LLVM does not currently have a separate illumos target, | ||
// so we still pass Solaris to it | ||
llvm_target: "aarch64-unknown-solaris2.11".into(), | ||
pointer_width: 64, | ||
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(), | ||
arch: "aarch64".into(), | ||
options: base, | ||
} | ||
} |
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,19 @@ | ||
#![no_std] | ||
|
||
// @has "$.index[*][?(@.name=='FooUnsafe')]" | ||
// @is "$.index[*][?(@.name=='FooUnsafe')].inner.trait.is_object_safe" false | ||
pub trait FooUnsafe { | ||
fn foo() -> Self; | ||
} | ||
|
||
// @has "$.index[*][?(@.name=='BarUnsafe')]" | ||
// @is "$.index[*][?(@.name=='BarUnsafe')].inner.trait.is_object_safe" false | ||
pub trait BarUnsafe<T> { | ||
fn foo(i: T); | ||
} | ||
|
||
// @has "$.index[*][?(@.name=='FooSafe')]" | ||
// @is "$.index[*][?(@.name=='FooSafe')].inner.trait.is_object_safe" true | ||
pub trait FooSafe { | ||
fn foo(&self); | ||
} |
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
16 changes: 16 additions & 0 deletions
16
tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-112822-expected-type-for-param.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,16 @@ | ||
#![feature(const_trait_impl, effects)] | ||
|
||
const fn test() -> impl ~const Fn() { //~ ERROR ~const can only be applied to `#[const_trait]` traits | ||
const move || { //~ ERROR const closures are experimental | ||
let sl: &[u8] = b"foo"; | ||
|
||
match sl { | ||
[first, remainder @ ..] => { | ||
assert_eq!(first, &b'f'); | ||
} | ||
[] => panic!(), | ||
} | ||
} | ||
} | ||
|
||
fn main() {} |
18 changes: 18 additions & 0 deletions
18
tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-112822-expected-type-for-param.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,18 @@ | ||
error[E0658]: const closures are experimental | ||
--> $DIR/ice-112822-expected-type-for-param.rs:4:5 | ||
| | ||
LL | const move || { | ||
| ^^^^^ | ||
| | ||
= note: see issue #106003 <https://github.com/rust-lang/rust/issues/106003> for more information | ||
= help: add `#![feature(const_closures)]` to the crate attributes to enable | ||
|
||
error: ~const can only be applied to `#[const_trait]` traits | ||
--> $DIR/ice-112822-expected-type-for-param.rs:3:32 | ||
| | ||
LL | const fn test() -> impl ~const Fn() { | ||
| ^^^^ | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0658`. |