mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Auto merge of #133500 - GuillaumeGomez:rollup-4vcthwo, r=GuillaumeGomez
Rollup of 13 pull requests Successful merges: - #133411 (the emscripten OS no longer exists on non-wasm targets) - #133419 (Added a doc test for std::path::strip_prefix) - #133430 (Tweak parameter mismatch explanation to not say `{unknown}`) - #133443 (Remove dead code stemming from the old effects desugaring (II)) - #133450 (remove "onur-ozkan" from users_on_vacation) - #133454 (Update test expectations to accept LLVM 'initializes' attribute) - #133462 (Use ReadCache for archive reading in bootstrap) - #133464 (std:🧵 avoid leading whitespace in some panic messages) - #133467 (tests: Add recursive associated type bound regression tests) - #133470 (Cleanup: delete `//@ pretty-expanded` directive) - #133473 (tests: Add regression test for recursive enum with Cow and Clone) - #133481 (Disable `avr-rjmp-offset` on Windows for now) - #133495 (add test for alias-bound shadowing, rename folder) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
dff3e7ccd4
@ -2117,11 +2117,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
hir::ConstArgKind::Anon(ct)
|
||||
};
|
||||
|
||||
self.arena.alloc(hir::ConstArg {
|
||||
hir_id: self.next_id(),
|
||||
kind: ct_kind,
|
||||
is_desugared_from_effects: false,
|
||||
})
|
||||
self.arena.alloc(hir::ConstArg { hir_id: self.next_id(), kind: ct_kind })
|
||||
}
|
||||
|
||||
/// See [`hir::ConstArg`] for when to use this function vs
|
||||
@ -2163,19 +2159,11 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
None,
|
||||
);
|
||||
|
||||
return ConstArg {
|
||||
hir_id: self.next_id(),
|
||||
kind: hir::ConstArgKind::Path(qpath),
|
||||
is_desugared_from_effects: false,
|
||||
};
|
||||
return ConstArg { hir_id: self.next_id(), kind: hir::ConstArgKind::Path(qpath) };
|
||||
}
|
||||
|
||||
let lowered_anon = self.lower_anon_const_to_anon_const(anon);
|
||||
ConstArg {
|
||||
hir_id: self.next_id(),
|
||||
kind: hir::ConstArgKind::Anon(lowered_anon),
|
||||
is_desugared_from_effects: false,
|
||||
}
|
||||
ConstArg { hir_id: self.next_id(), kind: hir::ConstArgKind::Anon(lowered_anon) }
|
||||
}
|
||||
|
||||
/// See [`hir::ConstArg`] for when to use this function vs
|
||||
|
@ -261,8 +261,6 @@ pub struct ConstArg<'hir> {
|
||||
#[stable_hasher(ignore)]
|
||||
pub hir_id: HirId,
|
||||
pub kind: ConstArgKind<'hir>,
|
||||
/// Indicates whether this comes from a `~const` desugaring.
|
||||
pub is_desugared_from_effects: bool,
|
||||
}
|
||||
|
||||
impl<'hir> ConstArg<'hir> {
|
||||
@ -462,14 +460,7 @@ impl<'hir> GenericArgs<'hir> {
|
||||
/// This function returns the number of type and const generic params.
|
||||
/// It should only be used for diagnostics.
|
||||
pub fn num_generic_params(&self) -> usize {
|
||||
self.args
|
||||
.iter()
|
||||
.filter(|arg| match arg {
|
||||
GenericArg::Lifetime(_)
|
||||
| GenericArg::Const(ConstArg { is_desugared_from_effects: true, .. }) => false,
|
||||
_ => true,
|
||||
})
|
||||
.count()
|
||||
self.args.iter().filter(|arg| !matches!(arg, GenericArg::Lifetime(_))).count()
|
||||
}
|
||||
|
||||
/// The span encompassing the arguments and constraints[^1] inside the surrounding brackets.
|
||||
|
@ -2347,9 +2347,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||
|
||||
let check_for_matched_generics = || {
|
||||
if matched_inputs.iter().any(|x| x.is_some())
|
||||
&& params_with_generics.iter().any(|x| x.0.is_some())
|
||||
&& params_with_generics.iter().any(|x| x.1.is_some())
|
||||
{
|
||||
for (idx, (generic, _)) in params_with_generics.iter().enumerate() {
|
||||
for &(idx, generic, _) in ¶ms_with_generics {
|
||||
// Param has to have a generic and be matched to be relevant
|
||||
if matched_inputs[idx.into()].is_none() {
|
||||
continue;
|
||||
@ -2362,7 +2362,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||
for unmatching_idx in idx + 1..params_with_generics.len() {
|
||||
if matched_inputs[unmatching_idx.into()].is_none()
|
||||
&& let Some(unmatched_idx_param_generic) =
|
||||
params_with_generics[unmatching_idx].0
|
||||
params_with_generics[unmatching_idx].1
|
||||
&& unmatched_idx_param_generic.name.ident()
|
||||
== generic.name.ident()
|
||||
{
|
||||
@ -2377,8 +2377,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||
|
||||
let check_for_matched_generics = check_for_matched_generics();
|
||||
|
||||
for (idx, (generic_param, param)) in
|
||||
params_with_generics.iter().enumerate().filter(|(idx, _)| {
|
||||
for &(idx, generic_param, param) in
|
||||
params_with_generics.iter().filter(|&(idx, _, _)| {
|
||||
check_for_matched_generics
|
||||
|| expected_idx.is_none_or(|expected_idx| expected_idx == *idx)
|
||||
})
|
||||
@ -2390,8 +2390,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||
|
||||
let other_params_matched: Vec<(usize, &hir::Param<'_>)> = params_with_generics
|
||||
.iter()
|
||||
.enumerate()
|
||||
.filter(|(other_idx, (other_generic_param, _))| {
|
||||
.filter(|(other_idx, other_generic_param, _)| {
|
||||
if *other_idx == idx {
|
||||
return false;
|
||||
}
|
||||
@ -2410,18 +2409,18 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||
}
|
||||
other_generic_param.name.ident() == generic_param.name.ident()
|
||||
})
|
||||
.map(|(other_idx, (_, other_param))| (other_idx, *other_param))
|
||||
.map(|&(other_idx, _, other_param)| (other_idx, other_param))
|
||||
.collect();
|
||||
|
||||
if !other_params_matched.is_empty() {
|
||||
let other_param_matched_names: Vec<String> = other_params_matched
|
||||
.iter()
|
||||
.map(|(_, other_param)| {
|
||||
.map(|(idx, other_param)| {
|
||||
if let hir::PatKind::Binding(_, _, ident, _) = other_param.pat.kind
|
||||
{
|
||||
format!("`{ident}`")
|
||||
} else {
|
||||
"{unknown}".to_string()
|
||||
format!("parameter #{}", idx + 1)
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
@ -2478,18 +2477,18 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||
{
|
||||
let param_idents_matching: Vec<String> = params_with_generics
|
||||
.iter()
|
||||
.filter(|(generic, _)| {
|
||||
.filter(|(_, generic, _)| {
|
||||
if let Some(generic) = generic {
|
||||
generic.name.ident() == generic_param.name.ident()
|
||||
} else {
|
||||
false
|
||||
}
|
||||
})
|
||||
.map(|(_, param)| {
|
||||
.map(|(idx, _, param)| {
|
||||
if let hir::PatKind::Binding(_, _, ident, _) = param.pat.kind {
|
||||
format!("`{ident}`")
|
||||
} else {
|
||||
"{unknown}".to_string()
|
||||
format!("parameter #{}", idx + 1)
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
@ -2498,8 +2497,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||
spans.push_span_label(
|
||||
generic_param.span,
|
||||
format!(
|
||||
"{} all reference this parameter {}",
|
||||
"{} {} reference this parameter `{}`",
|
||||
display_list_with_comma_and(¶m_idents_matching),
|
||||
if param_idents_matching.len() == 2 { "both" } else { "all" },
|
||||
generic_param.name.ident().name,
|
||||
),
|
||||
);
|
||||
@ -2580,7 +2580,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||
|
||||
if let Some(params_with_generics) = self.get_hir_params_with_generics(def_id, is_method) {
|
||||
debug_assert_eq!(params_with_generics.len(), matched_inputs.len());
|
||||
for (idx, (generic_param, _)) in params_with_generics.iter().enumerate() {
|
||||
for &(idx, generic_param, _) in ¶ms_with_generics {
|
||||
if matched_inputs[idx.into()].is_none() {
|
||||
continue;
|
||||
}
|
||||
@ -2594,20 +2594,20 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||
};
|
||||
|
||||
let mut idxs_matched: Vec<usize> = vec![];
|
||||
for (other_idx, (_, _)) in params_with_generics.iter().enumerate().filter(
|
||||
|(other_idx, (other_generic_param, _))| {
|
||||
if *other_idx == idx {
|
||||
for &(other_idx, _, _) in
|
||||
params_with_generics.iter().filter(|&&(other_idx, other_generic_param, _)| {
|
||||
if other_idx == idx {
|
||||
return false;
|
||||
}
|
||||
let Some(other_generic_param) = other_generic_param else {
|
||||
return false;
|
||||
};
|
||||
if matched_inputs[(*other_idx).into()].is_some() {
|
||||
if matched_inputs[other_idx.into()].is_some() {
|
||||
return false;
|
||||
}
|
||||
other_generic_param.name.ident() == generic_param.name.ident()
|
||||
},
|
||||
) {
|
||||
})
|
||||
{
|
||||
idxs_matched.push(other_idx);
|
||||
}
|
||||
|
||||
@ -2642,7 +2642,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||
&self,
|
||||
def_id: DefId,
|
||||
is_method: bool,
|
||||
) -> Option<Vec<(Option<&hir::GenericParam<'_>>, &hir::Param<'_>)>> {
|
||||
) -> Option<Vec<(usize, Option<&hir::GenericParam<'_>>, &hir::Param<'_>)>> {
|
||||
let fn_node = self.tcx.hir().get_if_local(def_id)?;
|
||||
let fn_decl = fn_node.fn_decl()?;
|
||||
|
||||
@ -2685,7 +2685,14 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||
}
|
||||
|
||||
debug_assert_eq!(params.len(), generic_params.len());
|
||||
Some(generic_params.into_iter().zip(params).collect())
|
||||
Some(
|
||||
generic_params
|
||||
.into_iter()
|
||||
.zip(params)
|
||||
.enumerate()
|
||||
.map(|(a, (b, c))| (a, b, c))
|
||||
.collect(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1172,7 +1172,7 @@ fn attempt_load_dylib(path: &Path) -> Result<libloading::Library, libloading::Er
|
||||
// the expected format is lib<name>.a(libname.so) for the actual
|
||||
// dynamic library
|
||||
let library_name = path.file_stem().expect("expect a library name");
|
||||
let mut archive_member = OsString::from("a(");
|
||||
let mut archive_member = std::ffi::OsString::from("a(");
|
||||
archive_member.push(library_name);
|
||||
archive_member.push(".so)");
|
||||
let new_path = path.with_extension(archive_member);
|
||||
|
@ -19,6 +19,9 @@ impl Target {
|
||||
if self.is_like_msvc {
|
||||
assert!(self.is_like_windows);
|
||||
}
|
||||
if self.os == "emscripten" {
|
||||
assert!(self.is_like_wasm);
|
||||
}
|
||||
|
||||
// Check that default linker flavor is compatible with some other key properties.
|
||||
assert_eq!(self.is_like_osx, matches!(self.linker_flavor, LinkerFlavor::Darwin(..)));
|
||||
@ -137,7 +140,7 @@ impl Target {
|
||||
assert!(self.dynamic_linking);
|
||||
}
|
||||
// Apparently PIC was slow on wasm at some point, see comments in wasm_base.rs
|
||||
if self.dynamic_linking && !(self.is_like_wasm && self.os != "emscripten") {
|
||||
if self.dynamic_linking && !self.is_like_wasm {
|
||||
assert_eq!(self.relocation_model, RelocModel::Pic);
|
||||
}
|
||||
if self.position_independent_executables {
|
||||
|
@ -2504,6 +2504,7 @@ impl Path {
|
||||
/// assert_eq!(path.strip_prefix("/test/haha/foo.txt/"), Ok(Path::new("")));
|
||||
///
|
||||
/// assert!(path.strip_prefix("test").is_err());
|
||||
/// assert!(path.strip_prefix("/te").is_err());
|
||||
/// assert!(path.strip_prefix("/haha").is_err());
|
||||
///
|
||||
/// let prefix = PathBuf::from("/test/");
|
||||
|
@ -243,17 +243,17 @@ fn init_current(current: *mut ()) -> Thread {
|
||||
// a particular API should be entirely allocation-free, feel free to open
|
||||
// an issue on the Rust repository, we'll see what we can do.
|
||||
rtabort!(
|
||||
"\n
|
||||
Attempted to access thread-local data while allocating said data.\n
|
||||
Do not access functions that allocate in the global allocator!\n
|
||||
This is a bug in the global allocator.\n
|
||||
"
|
||||
"\n\
|
||||
Attempted to access thread-local data while allocating said data.\n\
|
||||
Do not access functions that allocate in the global allocator!\n\
|
||||
This is a bug in the global allocator.\n\
|
||||
"
|
||||
)
|
||||
} else {
|
||||
debug_assert_eq!(current, DESTROYED);
|
||||
panic!(
|
||||
"use of std::thread::current() is not possible after the thread's
|
||||
local data has been destroyed"
|
||||
"use of std::thread::current() is not possible after the thread's \
|
||||
local data has been destroyed"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ fd-lock = "4.0"
|
||||
home = "0.5"
|
||||
ignore = "0.4"
|
||||
libc = "0.2"
|
||||
object = { version = "0.36.3", default-features = false, features = ["archive", "coff", "read_core", "unaligned"] }
|
||||
object = { version = "0.36.3", default-features = false, features = ["archive", "coff", "read_core", "std", "unaligned"] }
|
||||
opener = "0.5"
|
||||
semver = "1.0"
|
||||
serde = "1.0"
|
||||
|
@ -61,18 +61,18 @@ pub fn is_dylib(path: &Path) -> bool {
|
||||
}
|
||||
|
||||
fn is_aix_shared_archive(path: &Path) -> bool {
|
||||
// FIXME(#133268): reading the entire file as &[u8] into memory seems excessive
|
||||
// look into either mmap it or use the ReadCache
|
||||
let data = match fs::read(path) {
|
||||
Ok(data) => data,
|
||||
Err(_) => return false,
|
||||
};
|
||||
let file = match ArchiveFile::parse(&*data) {
|
||||
let file = match fs::File::open(path) {
|
||||
Ok(file) => file,
|
||||
Err(_) => return false,
|
||||
};
|
||||
let reader = object::ReadCache::new(file);
|
||||
let archive = match ArchiveFile::parse(&reader) {
|
||||
Ok(result) => result,
|
||||
Err(_) => return false,
|
||||
};
|
||||
|
||||
file.members()
|
||||
archive
|
||||
.members()
|
||||
.filter_map(Result::ok)
|
||||
.any(|entry| String::from_utf8_lossy(entry.name()).contains(".so"))
|
||||
}
|
||||
|
@ -2516,14 +2516,6 @@ fn clean_generic_args<'tcx>(
|
||||
}
|
||||
hir::GenericArg::Lifetime(_) => GenericArg::Lifetime(Lifetime::elided()),
|
||||
hir::GenericArg::Type(ty) => GenericArg::Type(clean_ty(ty, cx)),
|
||||
// Checking for `is_desugared_from_effects` on the `AnonConst` not only accounts for the case
|
||||
// where the argument is `host` but for all possible cases (e.g., `true`, `false`).
|
||||
hir::GenericArg::Const(hir::ConstArg {
|
||||
is_desugared_from_effects: true,
|
||||
..
|
||||
}) => {
|
||||
return None;
|
||||
}
|
||||
hir::GenericArg::Const(ct) => GenericArg::Const(Box::new(clean_const(ct, cx))),
|
||||
hir::GenericArg::Infer(_inf) => GenericArg::Infer,
|
||||
})
|
||||
|
@ -214,7 +214,6 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
|
||||
"only-x86_64-unknown-linux-gnu",
|
||||
"pp-exact",
|
||||
"pretty-compare-only",
|
||||
"pretty-expanded",
|
||||
"pretty-mode",
|
||||
"reference",
|
||||
"regex-error-pattern",
|
||||
|
@ -124,8 +124,6 @@ pub struct TestProps {
|
||||
// a proc-macro and needs `#![crate_type = "proc-macro"]`. This ensures
|
||||
// that the aux file is compiled as a `proc-macro` and not as a `dylib`.
|
||||
pub no_prefer_dynamic: bool,
|
||||
// Run -Zunpretty expanded when running pretty printing tests
|
||||
pub pretty_expanded: bool,
|
||||
// Which pretty mode are we testing with, default to 'normal'
|
||||
pub pretty_mode: String,
|
||||
// Only compare pretty output and don't try compiling
|
||||
@ -218,7 +216,6 @@ mod directives {
|
||||
pub const DONT_CHECK_COMPILER_STDOUT: &'static str = "dont-check-compiler-stdout";
|
||||
pub const DONT_CHECK_COMPILER_STDERR: &'static str = "dont-check-compiler-stderr";
|
||||
pub const NO_PREFER_DYNAMIC: &'static str = "no-prefer-dynamic";
|
||||
pub const PRETTY_EXPANDED: &'static str = "pretty-expanded";
|
||||
pub const PRETTY_MODE: &'static str = "pretty-mode";
|
||||
pub const PRETTY_COMPARE_ONLY: &'static str = "pretty-compare-only";
|
||||
pub const AUX_BIN: &'static str = "aux-bin";
|
||||
@ -278,7 +275,6 @@ impl TestProps {
|
||||
dont_check_compiler_stderr: false,
|
||||
compare_output_lines_by_subset: false,
|
||||
no_prefer_dynamic: false,
|
||||
pretty_expanded: false,
|
||||
pretty_mode: "normal".to_string(),
|
||||
pretty_compare_only: false,
|
||||
forbid_output: vec![],
|
||||
@ -425,7 +421,6 @@ impl TestProps {
|
||||
&mut self.dont_check_compiler_stderr,
|
||||
);
|
||||
config.set_name_directive(ln, NO_PREFER_DYNAMIC, &mut self.no_prefer_dynamic);
|
||||
config.set_name_directive(ln, PRETTY_EXPANDED, &mut self.pretty_expanded);
|
||||
|
||||
if let Some(m) = config.parse_name_value_directive(ln, PRETTY_MODE) {
|
||||
self.pretty_mode = m;
|
||||
|
@ -84,21 +84,5 @@ impl TestCx<'_> {
|
||||
if !proc_res.status.success() {
|
||||
self.fatal_proc_rec("pretty-printed source does not typecheck", &proc_res);
|
||||
}
|
||||
|
||||
if !self.props.pretty_expanded {
|
||||
return;
|
||||
}
|
||||
|
||||
// additionally, run `-Zunpretty=expanded` and try to build it.
|
||||
let proc_res = self.print_source(ReadFrom::Path, "expanded");
|
||||
if !proc_res.status.success() {
|
||||
self.fatal_proc_rec("pretty-printing (expanded) failed", &proc_res);
|
||||
}
|
||||
|
||||
let ProcRes { stdout: expanded_src, .. } = proc_res;
|
||||
let proc_res = self.typecheck_source(expanded_src);
|
||||
if !proc_res.status.success() {
|
||||
self.fatal_proc_rec("pretty-printed source (expanded) does not typecheck", &proc_res);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ fn pass_f32_pair_Rust(x: (f32, f32)) -> (f32, f32) {
|
||||
x
|
||||
}
|
||||
|
||||
// CHECK: void @pass_f64_pair_Rust(ptr {{[^,]*}}, ptr {{[^,]*}})
|
||||
// CHECK: void @pass_f64_pair_Rust(ptr {{.*}}%{{[^ ]+}}, ptr {{.*}}%{{[^ ]+}})
|
||||
#[no_mangle]
|
||||
fn pass_f64_pair_Rust(x: (f64, f64)) -> (f64, f64) {
|
||||
x
|
||||
|
@ -10,6 +10,11 @@
|
||||
//! wrong output is only produced with direct assembly generation, but not when
|
||||
//! "emit-asm" is used, as described in the issue description of #129301:
|
||||
//! https://github.com/rust-lang/rust/issues/129301#issue-2475070770
|
||||
|
||||
// FIXME(#133480): this has been randomly failing on `x86_64-mingw` due to linker hangs or
|
||||
// crashes... so I'm going to disable this test for windows for now.
|
||||
//@ ignore-windows
|
||||
|
||||
use run_make_support::{llvm_objdump, rustc};
|
||||
|
||||
fn main() {
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ run-pass
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
#[link(name = "rust_test_helpers", kind = "static")]
|
||||
extern "C" {
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ run-pass
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
mod rustrt {
|
||||
#[link(name = "rust_test_helpers", kind = "static")]
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ aux-build:anon-extern-mod-cross-crate-1.rs
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
extern crate anonexternmod;
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
//@ run-pass
|
||||
//@ aux-build:anon-extern-mod-cross-crate-1.rs
|
||||
//@ aux-build:anon-extern-mod-cross-crate-1.rs
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
extern crate anonexternmod;
|
||||
|
||||
|
1
tests/ui/abi/extern/extern-pass-empty.rs
vendored
1
tests/ui/abi/extern/extern-pass-empty.rs
vendored
@ -3,7 +3,6 @@
|
||||
|
||||
// Test a foreign function that accepts empty struct.
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
//@ ignore-msvc
|
||||
//@ ignore-emscripten emcc asserts on an empty struct as an argument
|
||||
|
||||
|
@ -5,7 +5,6 @@
|
||||
// successfully (and safely) invoke external, cdecl
|
||||
// functions from outside the crate.
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
extern crate foreign_lib;
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
// Regression test for issue #374
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
enum sty { ty_nil, }
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
|
||||
// issues #10618 and #16382
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
const SIZE: isize = 25;
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ run-pass
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
#![allow(unused_mut)]
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_mut)]
|
||||
#![allow(unused_variables)]
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
fn main() {
|
||||
let mut array = [1, 2, 3];
|
||||
|
@ -2,7 +2,6 @@
|
||||
// Check that codegen doesn't ICE when codegenning an array repeat
|
||||
// expression with a count of 1 and a non-Copy element type.
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
fn main() {
|
||||
let _ = [Box::new(1_usize); 1];
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ run-pass
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
pub fn main() {
|
||||
let _x: &mut [isize] = &mut [ 1, 2, 3 ];
|
||||
|
@ -1,7 +1,6 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_variables)]
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
macro_rules! vec [
|
||||
($($e:expr),*) => ({
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ run-pass
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
pub fn main() { let _a = [0; 1 as usize]; }
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ run-pass
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
pub fn main() {
|
||||
let _quux: Box<Vec<usize>> = Box::new(Vec::new());
|
||||
|
@ -1,7 +1,6 @@
|
||||
//@ run-pass
|
||||
// Test equality constraints on associated types in a where clause.
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
pub trait Foo {
|
||||
type A;
|
||||
|
@ -5,7 +5,6 @@
|
||||
// `Target=[A]`, then the impl marked with `(*)` is seen to conflict
|
||||
// with all the others.
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
use std::marker::PhantomData;
|
||||
use std::ops::Deref;
|
||||
|
@ -4,7 +4,6 @@
|
||||
// (modulo bound lifetime names) appears in the environment
|
||||
// twice. Issue #21965.
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
fn foo<T>(t: T) -> i32
|
||||
where T : for<'a> Fn(&'a u8) -> i32,
|
||||
|
@ -3,7 +3,6 @@
|
||||
// Check that we do not report ambiguities when the same predicate
|
||||
// appears in the environment twice. Issue #21965.
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
trait Foo {
|
||||
type B;
|
||||
|
@ -1,7 +1,6 @@
|
||||
//@ run-pass
|
||||
// Test equality constraints on associated types inside of an object type
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
pub trait Foo {
|
||||
type A;
|
||||
|
@ -2,7 +2,6 @@
|
||||
// Test that we are able to have an impl that defines an associated type
|
||||
// before the actual trait.
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
impl X for f64 { type Y = isize; }
|
||||
trait X { type Y; }
|
||||
|
@ -2,7 +2,6 @@
|
||||
#![allow(unused_variables)]
|
||||
// Test that we can resolve nested projection types. Issue #20666.
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
use std::slice;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
warning: method `into_iter` is never used
|
||||
--> $DIR/associated-types-nested-projections.rs:16:8
|
||||
--> $DIR/associated-types-nested-projections.rs:15:8
|
||||
|
|
||||
LL | trait IntoIterator {
|
||||
| ------------ method in this trait
|
||||
|
@ -3,7 +3,6 @@
|
||||
// Test that we normalize associated types that appear in a bound that
|
||||
// contains a binding. Issue #21664.
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
#![allow(dead_code)]
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// Test that we normalize associated types that appear in bounds; if
|
||||
// we didn't, the call to `self.split2()` fails to type check.
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
use std::marker::PhantomData;
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// Test that we normalize associated types that appear in bounds; if
|
||||
// we didn't, the call to `self.split2()` fails to type check.
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
use std::marker::PhantomData;
|
||||
|
||||
|
@ -6,7 +6,6 @@
|
||||
// appear in associated type bindings in object types, which were not
|
||||
// being properly flagged.
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
use std::ops::{Shl, Shr};
|
||||
use std::cell::RefCell;
|
||||
|
@ -3,7 +3,6 @@
|
||||
#![allow(unused_variables)]
|
||||
// Test a where clause that uses a non-normalized projection type.
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
trait Int
|
||||
{
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ check-pass
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
trait Foo<T> {
|
||||
type Bar;
|
||||
|
@ -1,7 +1,6 @@
|
||||
//@ run-pass
|
||||
// Test associated type references in structure fields.
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
trait Test {
|
||||
type V;
|
||||
|
@ -3,7 +3,6 @@
|
||||
// Regression test for #20582. This test caused an ICE related to
|
||||
// inconsistent region erasure in codegen.
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
struct Foo<'a> {
|
||||
buf: &'a[u8]
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ check-pass
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
trait Get<T> {
|
||||
fn get(&self) -> T;
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ check-pass
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
trait Trait<Input> {
|
||||
type Output;
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ check-pass
|
||||
#![allow(unused_variables)]
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
trait Trait<Input> {
|
||||
type Output;
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ check-pass
|
||||
#![allow(dead_code)]
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
trait T0 {
|
||||
type O;
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ check-pass
|
||||
#![allow(dead_code)]
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
trait T0 {
|
||||
type O;
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ check-pass
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
#![no_implicit_prelude]
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
// subtyping of projection types that resulted in an unconstrained
|
||||
// region, yielding region inference failures.
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
fn main() { }
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// Test transitive analysis for associated types. Collected types
|
||||
// should be normalized and new obligations generated.
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
trait Foo {
|
||||
type A;
|
||||
|
@ -19,7 +19,7 @@ LL | fn fun<F: Future<Output = ()>>(f1: F, f2: F) {}
|
||||
| ^^^ - ----- ----- this parameter needs to match the `async` block type of `f1`
|
||||
| | |
|
||||
| | `f2` needs to match the `async` block type of this parameter
|
||||
| `f1` and `f2` all reference this parameter F
|
||||
| `f1` and `f2` both reference this parameter `F`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/coroutine-desc.rs:12:16
|
||||
@ -39,7 +39,7 @@ LL | fn fun<F: Future<Output = ()>>(f1: F, f2: F) {}
|
||||
| ^^^ - ----- ----- this parameter needs to match the future type of `f1`
|
||||
| | |
|
||||
| | `f2` needs to match the future type of this parameter
|
||||
| `f1` and `f2` all reference this parameter F
|
||||
| `f1` and `f2` both reference this parameter `F`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/coroutine-desc.rs:14:26
|
||||
@ -62,7 +62,7 @@ LL | fn fun<F: Future<Output = ()>>(f1: F, f2: F) {}
|
||||
| ^^^ - ----- ----- this parameter needs to match the `async` closure body type of `f1`
|
||||
| | |
|
||||
| | `f2` needs to match the `async` closure body type of this parameter
|
||||
| `f1` and `f2` all reference this parameter F
|
||||
| `f1` and `f2` both reference this parameter `F`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ run-pass
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
#![feature(start)]
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ build-pass (FIXME(62277): could be check-pass?)
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
#![feature(rustc_attrs)]
|
||||
#![feature(test)]
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ build-pass (FIXME(62277): could be check-pass?)
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
#![feature(rustc_attrs)]
|
||||
#![feature(test)]
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ build-pass (FIXME(62277): could be check-pass?)
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
#![feature(rustc_attrs)]
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ build-pass (FIXME(62277): could be check-pass?)
|
||||
//@ pp-exact - Make sure we print all the attributes
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
#![feature(rustc_attrs)]
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ build-pass (FIXME(62277): could be check-pass?)
|
||||
//@ pp-exact - Make sure we actually print the attributes
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
#![allow(non_camel_case_types)]
|
||||
#![feature(rustc_attrs)]
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ run-pass
|
||||
#![allow(dead_code)]
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
struct Foo {
|
||||
x: isize,
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ run-pass
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
fn main() {
|
||||
let _ = test(Some(0).into_iter());
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ run-pass
|
||||
#![allow(dead_code)]
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
fn foo(_: &[&str]) {}
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ run-pass
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
struct X { x: isize }
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ run-pass
|
||||
#![allow(dead_code)]
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
struct X { x: isize }
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
mod m1 {
|
||||
pub enum foo { foo1, foo2, }
|
||||
|
@ -2,7 +2,6 @@
|
||||
#![allow(dead_code)]
|
||||
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
fn altsimple(f: isize) { match f { _x => () } }
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
//@ run-pass
|
||||
#![allow(dead_code)]
|
||||
#![allow(unused_assignments)]
|
||||
//@ pretty-expanded FIXME #23616
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(unused_variables)]
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ run-pass
|
||||
//@ pretty-expanded FIXME #23616
|
||||
#![allow(non_upper_case_globals)]
|
||||
|
||||
const s: isize = 1;
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ run-pass
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
fn foo(x: Option<Box<isize>>, b: bool) -> isize {
|
||||
match x {
|
||||
|
@ -1,4 +1,3 @@
|
||||
//@ run-pass
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
pub fn main() { let x = (); match x { () => { } } }
|
||||
|
@ -1,7 +1,6 @@
|
||||
//@ run-pass
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
enum clam<T> { a(#[allow(dead_code)] T), }
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ run-pass
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
pub fn main() {
|
||||
struct A {
|
||||
|
@ -7,7 +7,6 @@
|
||||
//
|
||||
// Example from compiler/rustc_borrowck/borrowck/README.md
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
fn foo<'a>(mut t0: &'a mut isize,
|
||||
mut t1: &'a mut isize) {
|
||||
|
@ -2,7 +2,6 @@
|
||||
#![allow(unused_mut)]
|
||||
#![allow(unused_variables)]
|
||||
#![allow(dropping_copy_types)]
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
struct A { a: isize, b: Box<isize> }
|
||||
struct B { a: Box<isize>, b: Box<isize> }
|
||||
|
@ -1,7 +1,6 @@
|
||||
//@ run-pass
|
||||
#![allow(dead_code)]
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
fn borrow(_v: &isize) {}
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
#![allow(dead_code)]
|
||||
// Regression test for issue #7740
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
pub fn main() {
|
||||
static A: &'static char = &'A';
|
||||
|
@ -3,7 +3,6 @@
|
||||
// This test verifies that casting from the same lifetime on a value
|
||||
// to the same lifetime on a trait succeeds. See issue #10766.
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
#![allow(dead_code)]
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
//@ run-pass
|
||||
#![allow(dead_code)]
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
struct Rec {
|
||||
f: Box<isize>,
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ run-pass
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
#![allow(dropping_copy_types)]
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ run-pass
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ run-pass
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
fn main() {
|
||||
let _a = Box::new(1);
|
||||
|
@ -2,7 +2,6 @@
|
||||
#![allow(dead_code)]
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
pub fn main() {
|
||||
enum t { t1(isize), t2(isize), }
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ run-pass
|
||||
#![allow(dead_code)]
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
pub fn main() {
|
||||
let _: Box<_> = Box::new(100);
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ run-pass
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
pub fn main() {
|
||||
let _x: Box<_> = Box::new(vec![0,0,0,0,0]);
|
||||
|
@ -3,7 +3,6 @@
|
||||
// Issue #976
|
||||
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
fn f<T>(x: Box<T>) {
|
||||
let _x2 = x;
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ run-pass
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
pub fn main() {
|
||||
let _i: Box<_> = Box::new(100);
|
||||
|
@ -2,7 +2,6 @@
|
||||
#![allow(dead_code)]
|
||||
// Issue #961
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
fn altsimple() {
|
||||
match Box::new(true) {
|
||||
|
@ -2,7 +2,6 @@
|
||||
#![allow(dead_code)]
|
||||
// Issue #5192
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
pub trait EventLoop { fn foo(&self) {} }
|
||||
|
||||
|
@ -5,7 +5,6 @@
|
||||
// super-builtin-kind of a trait, if the type parameter is never used,
|
||||
// the type can implement the trait anyway.
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
use std::marker;
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
//@ check-pass
|
||||
// Simple test case of implementing a trait with super-builtin-kinds.
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
trait Foo : Send { }
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
// Tests correct implementation of traits with super-builtin-kinds
|
||||
// using a bounded type parameter.
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
trait Foo : Send { }
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ run-pass
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ run-pass
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
fn foo(x: &mut Box<u8>) {
|
||||
*x = Box::new(5);
|
||||
|
@ -2,7 +2,6 @@
|
||||
// main is conditionally compiled, but the conditional compilation
|
||||
// is conditional too!
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
#[cfg_attr(FALSE, cfg(bar))]
|
||||
fn main() { }
|
||||
|
@ -1,7 +1,6 @@
|
||||
//@ run-pass
|
||||
// https://github.com/rust-lang/rust/issues/21833#issuecomment-72353044
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
#![cfg_attr(FALSE, no_core)]
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ build-pass
|
||||
//@ pretty-expanded FIXME #23616
|
||||
//@ ignore-wasm32 no bare family
|
||||
//@ ignore-sgx
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ run-pass
|
||||
#![allow(dead_code)]
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
enum Foo {
|
||||
Bar,
|
||||
|
@ -1,7 +1,6 @@
|
||||
//@ build-pass
|
||||
//@ ignore-sgx
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
#[cfg(target_family = "windows")]
|
||||
pub fn main() {}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user