forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
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#104743 - JohnTitor:rollup-9z9u7yd, r=JohnTitor
Rollup of 7 pull requests Successful merges: - rust-lang#101368 (Forbid inlining `thread_local!`'s `__getit` function on Windows) - rust-lang#102293 (Add powerpc64-ibm-aix as Tier-3 target) - rust-lang#104717 (Add failing test for projections used as const generic) - rust-lang#104720 (rustdoc: remove no-op CSS `.popover::before / a.test-arrow { display: inline-block }`) - rust-lang#104722 (Speed up mpsc_stress test) - rust-lang#104724 (Fix `ClosureKind::to_def_id`) - rust-lang#104728 (Use `tcx.require_lang_item` instead of unwrapping lang items) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
22 changed files
with
218 additions
and
54 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,32 @@ | ||
use crate::abi::Endian; | ||
use crate::spec::{crt_objects, cvs, Cc, CodeModel, LinkOutputKind, LinkerFlavor, TargetOptions}; | ||
|
||
pub fn opts() -> TargetOptions { | ||
TargetOptions { | ||
abi: "vec-extabi".into(), | ||
code_model: Some(CodeModel::Small), | ||
cpu: "pwr7".into(), | ||
os: "aix".into(), | ||
vendor: "ibm".into(), | ||
dynamic_linking: true, | ||
endian: Endian::Big, | ||
executables: true, | ||
archive_format: "aix_big".into(), | ||
families: cvs!["unix"], | ||
has_rpath: false, | ||
has_thread_local: true, | ||
crt_static_respected: true, | ||
linker_flavor: LinkerFlavor::Unix(Cc::No), | ||
linker: Some("ld".into()), | ||
eh_frame_header: false, | ||
is_like_aix: true, | ||
default_dwarf_version: 3, | ||
function_sections: true, | ||
pre_link_objects: crt_objects::new(&[ | ||
(LinkOutputKind::DynamicNoPicExe, &["/usr/lib/crt0_64.o", "/usr/lib/crti_64.o"]), | ||
(LinkOutputKind::DynamicPicExe, &["/usr/lib/crt0_64.o", "/usr/lib/crti_64.o"]), | ||
]), | ||
dll_suffix: ".a".into(), | ||
..Default::default() | ||
} | ||
} |
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,23 @@ | ||
use crate::spec::{Cc, LinkerFlavor, Target}; | ||
|
||
pub fn target() -> Target { | ||
let mut base = super::aix_base::opts(); | ||
base.max_atomic_width = Some(64); | ||
base.add_pre_link_args( | ||
LinkerFlavor::Unix(Cc::No), | ||
&[ | ||
"-b64".into(), | ||
"-bpT:0x100000000".into(), | ||
"-bpD:0x110000000".into(), | ||
"-bcdtors:all:0:s".into(), | ||
], | ||
); | ||
|
||
Target { | ||
llvm_target: "powerpc64-ibm-aix".into(), | ||
pointer_width: 64, | ||
data_layout: "E-m:a-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(), | ||
arch: "powerpc64".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
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 @@ | ||
// This is currently not possible to use projections as const generics. | ||
// More information about this available here: | ||
// https://github.com/rust-lang/rust/pull/104443#discussion_r1029375633 | ||
|
||
pub trait Identity { | ||
type Identity; | ||
} | ||
|
||
impl<T> Identity for T { | ||
type Identity = Self; | ||
} | ||
|
||
pub fn foo<const X: <i32 as Identity>::Identity>() { | ||
//~^ ERROR | ||
assert!(X == 12); | ||
} | ||
|
||
fn main() { | ||
foo::<12>(); | ||
} |
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: `<i32 as Identity>::Identity` is forbidden as the type of a const generic parameter | ||
--> $DIR/projection-as-arg-const.rs:13:21 | ||
| | ||
LL | pub fn foo<const X: <i32 as Identity>::Identity>() { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: the only supported types are integers, `bool` and `char` | ||
= help: more complex types are supported with `#![feature(adt_const_params)]` | ||
|
||
error: aborting due to previous error | ||
|
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
Oops, something went wrong.