diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index f8b3ba79c0d59..8325b6640ceaa 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -1015,12 +1015,8 @@ fn link_natively( && (code < 1000 || code > 9999) { let is_vs_installed = windows_registry::find_vs_version().is_ok(); - // FIXME(cc-rs#1265) pass only target arch to find_tool() - let has_linker = windows_registry::find_tool( - sess.opts.target_triple.tuple(), - "link.exe", - ) - .is_some(); + let has_linker = + windows_registry::find_tool(&sess.target.arch, "link.exe").is_some(); sess.dcx().emit_note(errors::LinkExeUnexpectedError); if is_vs_installed && has_linker { @@ -2745,6 +2741,15 @@ fn add_upstream_rust_crates( .find(|(ty, _)| *ty == crate_type) .expect("failed to find crate type in dependency format list"); + if sess.target.is_like_aix { + // Unlike ELF linkers, AIX doesn't feature `DT_SONAME` to override + // the dependency name when outputing a shared library. Thus, `ld` will + // use the full path to shared libraries as the dependency if passed it + // by default unless `noipath` is passed. + // https://www.ibm.com/docs/en/aix/7.3?topic=l-ld-command. + cmd.link_or_cc_arg("-bnoipath"); + } + for &cnum in &codegen_results.crate_info.used_crates { // We may not pass all crates through to the linker. Some crates may appear statically in // an existing dylib, meaning we'll pick up all the symbols from the dylib. diff --git a/compiler/rustc_codegen_ssa/src/back/linker.rs b/compiler/rustc_codegen_ssa/src/back/linker.rs index 05dfbd40a0ad6..17323f67ffa70 100644 --- a/compiler/rustc_codegen_ssa/src/back/linker.rs +++ b/compiler/rustc_codegen_ssa/src/back/linker.rs @@ -50,8 +50,7 @@ pub(crate) fn get_linker<'a>( self_contained: bool, target_cpu: &'a str, ) -> Box { - // FIXME(cc-rs#1265) pass only target arch to find_tool() - let msvc_tool = windows_registry::find_tool(sess.opts.target_triple.tuple(), "link.exe"); + let msvc_tool = windows_registry::find_tool(&sess.target.arch, "link.exe"); // If our linker looks like a batch script on Windows then to execute this // we'll need to spawn `cmd` explicitly. This is primarily done to handle diff --git a/compiler/rustc_hir_typeck/src/closure.rs b/compiler/rustc_hir_typeck/src/closure.rs index e715a7f7e1588..9037caf0066fe 100644 --- a/compiler/rustc_hir_typeck/src/closure.rs +++ b/compiler/rustc_hir_typeck/src/closure.rs @@ -454,20 +454,16 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { closure_kind: hir::ClosureKind, projection: ty::PolyProjectionPredicate<'tcx>, ) -> Option> { - let tcx = self.tcx; - - let trait_def_id = projection.trait_def_id(tcx); + let def_id = projection.projection_def_id(); // For now, we only do signature deduction based off of the `Fn` and `AsyncFn` traits, // for closures and async closures, respectively. match closure_kind { - hir::ClosureKind::Closure - if self.tcx.fn_trait_kind_from_def_id(trait_def_id).is_some() => - { + hir::ClosureKind::Closure if self.tcx.is_lang_item(def_id, LangItem::FnOnceOutput) => { self.extract_sig_from_projection(cause_span, projection) } hir::ClosureKind::CoroutineClosure(hir::CoroutineDesugaring::Async) - if self.tcx.async_fn_trait_kind_from_def_id(trait_def_id).is_some() => + if self.tcx.is_lang_item(def_id, LangItem::AsyncFnOnceOutput) => { self.extract_sig_from_projection(cause_span, projection) } @@ -475,7 +471,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { // `F: FnOnce() -> Fut, Fut: Future` style bound. Let's still // guide inference here, since it's beneficial for the user. hir::ClosureKind::CoroutineClosure(hir::CoroutineDesugaring::Async) - if self.tcx.fn_trait_kind_from_def_id(trait_def_id).is_some() => + if self.tcx.is_lang_item(def_id, LangItem::FnOnceOutput) => { self.extract_sig_from_projection_and_future_bound(cause_span, projection) } diff --git a/library/std/src/sys/pal/wasi/fs.rs b/library/std/src/sys/pal/wasi/fs.rs index 0667eb9010100..7779d2b97d7f9 100644 --- a/library/std/src/sys/pal/wasi/fs.rs +++ b/library/std/src/sys/pal/wasi/fs.rs @@ -27,10 +27,27 @@ pub struct FileAttr { pub struct ReadDir { inner: Arc, - cookie: Option, - buf: Vec, - offset: usize, - cap: usize, + state: ReadDirState, +} + +enum ReadDirState { + /// Fill `buf` with `buf.len()` bytes starting from `next_read_offset`. + FillBuffer { + next_read_offset: wasi::Dircookie, + buf: Vec, + }, + ProcessEntry { + buf: Vec, + next_read_offset: Option, + offset: usize, + }, + /// There is no more data to get in [`Self::FillBuffer`]; keep returning + /// entries via ProcessEntry until `buf` is exhausted. + RunUntilExhaustion { + buf: Vec, + offset: usize, + }, + Done, } struct ReadDirInner { @@ -147,11 +164,8 @@ impl FileType { impl ReadDir { fn new(dir: File, root: PathBuf) -> ReadDir { ReadDir { - cookie: Some(0), - buf: vec![0; 128], - offset: 0, - cap: 0, inner: Arc::new(ReadDirInner { dir, root }), + state: ReadDirState::FillBuffer { next_read_offset: 0, buf: vec![0; 128] }, } } } @@ -162,78 +176,99 @@ impl fmt::Debug for ReadDir { } } +impl core::iter::FusedIterator for ReadDir {} + impl Iterator for ReadDir { type Item = io::Result; fn next(&mut self) -> Option> { - loop { - // If we've reached the capacity of our buffer then we need to read - // some more from the OS, otherwise we pick up at our old offset. - let offset = if self.offset == self.cap { - let cookie = self.cookie.take()?; - match self.inner.dir.fd.readdir(&mut self.buf, cookie) { - Ok(bytes) => self.cap = bytes, - Err(e) => return Some(Err(e)), - } - self.offset = 0; - self.cookie = Some(cookie); - - // If we didn't actually read anything, this is in theory the - // end of the directory. - if self.cap == 0 { - self.cookie = None; - return None; - } - - 0 - } else { - self.offset - }; - let data = &self.buf[offset..self.cap]; - - // If we're not able to read a directory entry then that means it - // must have been truncated at the end of the buffer, so reset our - // offset so we can go back and reread into the buffer, picking up - // where we last left off. - let dirent_size = mem::size_of::(); - if data.len() < dirent_size { - assert!(self.cookie.is_some()); - assert!(self.buf.len() >= dirent_size); - self.offset = self.cap; - continue; - } - let (dirent, data) = data.split_at(dirent_size); - let dirent = unsafe { ptr::read_unaligned(dirent.as_ptr() as *const wasi::Dirent) }; - - // If the file name was truncated, then we need to reinvoke - // `readdir` so we truncate our buffer to start over and reread this - // descriptor. Note that if our offset is 0 that means the file name - // is massive and we need a bigger buffer. - if data.len() < dirent.d_namlen as usize { - if offset == 0 { - let amt_to_add = self.buf.capacity(); - self.buf.extend(iter::repeat(0).take(amt_to_add)); + match &mut self.state { + ReadDirState::FillBuffer { next_read_offset, ref mut buf } => { + let result = self.inner.dir.fd.readdir(buf, *next_read_offset); + match result { + Ok(read_bytes) => { + if read_bytes < buf.len() { + buf.truncate(read_bytes); + self.state = + ReadDirState::RunUntilExhaustion { buf: mem::take(buf), offset: 0 }; + } else { + debug_assert_eq!(read_bytes, buf.len()); + self.state = ReadDirState::ProcessEntry { + buf: mem::take(buf), + offset: 0, + next_read_offset: Some(*next_read_offset), + }; + } + self.next() + } + Err(e) => { + self.state = ReadDirState::Done; + return Some(Err(e)); + } } - assert!(self.cookie.is_some()); - self.offset = self.cap; - continue; } - self.cookie = Some(dirent.d_next); - self.offset = offset + dirent_size + dirent.d_namlen as usize; + ReadDirState::ProcessEntry { ref mut buf, next_read_offset, offset } => { + let contents = &buf[*offset..]; + const DIRENT_SIZE: usize = crate::mem::size_of::(); + if contents.len() >= DIRENT_SIZE { + let (dirent, data) = contents.split_at(DIRENT_SIZE); + let dirent = + unsafe { ptr::read_unaligned(dirent.as_ptr() as *const wasi::Dirent) }; + // If the file name was truncated, then we need to reinvoke + // `readdir` so we truncate our buffer to start over and reread this + // descriptor. + if data.len() < dirent.d_namlen as usize { + if buf.len() < dirent.d_namlen as usize + DIRENT_SIZE { + buf.resize(dirent.d_namlen as usize + DIRENT_SIZE, 0); + } + if let Some(next_read_offset) = *next_read_offset { + self.state = + ReadDirState::FillBuffer { next_read_offset, buf: mem::take(buf) }; + } else { + self.state = ReadDirState::Done; + } + + return self.next(); + } + next_read_offset.as_mut().map(|cookie| { + *cookie = dirent.d_next; + }); + *offset = *offset + DIRENT_SIZE + dirent.d_namlen as usize; - let name = &data[..(dirent.d_namlen as usize)]; + let name = &data[..(dirent.d_namlen as usize)]; + + // These names are skipped on all other platforms, so let's skip + // them here too + if name == b"." || name == b".." { + return self.next(); + } - // These names are skipped on all other platforms, so let's skip - // them here too - if name == b"." || name == b".." { - continue; + return Some(Ok(DirEntry { + meta: dirent, + name: name.to_vec(), + inner: self.inner.clone(), + })); + } else if let Some(next_read_offset) = *next_read_offset { + self.state = ReadDirState::FillBuffer { next_read_offset, buf: mem::take(buf) }; + } else { + self.state = ReadDirState::Done; + } + self.next() } + ReadDirState::RunUntilExhaustion { buf, offset } => { + if *offset >= buf.len() { + self.state = ReadDirState::Done; + } else { + self.state = ReadDirState::ProcessEntry { + buf: mem::take(buf), + offset: *offset, + next_read_offset: None, + }; + } - return Some(Ok(DirEntry { - meta: dirent, - name: name.to_vec(), - inner: self.inner.clone(), - })); + self.next() + } + ReadDirState::Done => None, } } } diff --git a/src/bootstrap/src/core/build_steps/install.rs b/src/bootstrap/src/core/build_steps/install.rs index 0ce86eadbce67..b6862c2d5c4a9 100644 --- a/src/bootstrap/src/core/build_steps/install.rs +++ b/src/bootstrap/src/core/build_steps/install.rs @@ -21,9 +21,9 @@ const SHELL: &str = "sh"; /// We have to run a few shell scripts, which choke quite a bit on both `\` /// characters and on `C:\` paths, so normalize both of them away. -fn sanitize_sh(path: &Path) -> String { +fn sanitize_sh(path: &Path, is_cygwin: bool) -> String { let path = path.to_str().unwrap().replace('\\', "/"); - return change_drive(unc_to_lfs(&path)).unwrap_or(path); + return if is_cygwin { path } else { change_drive(unc_to_lfs(&path)).unwrap_or(path) }; fn unc_to_lfs(s: &str) -> &str { s.strip_prefix("//?/").unwrap_or(s) @@ -71,6 +71,7 @@ fn install_sh( let prefix = default_path(&builder.config.prefix, "/usr/local"); let sysconfdir = prefix.join(default_path(&builder.config.sysconfdir, "/etc")); let destdir_env = env::var_os("DESTDIR").map(PathBuf::from); + let is_cygwin = builder.config.build.is_cygwin(); // Sanity checks on the write access of user. // @@ -103,14 +104,14 @@ fn install_sh( let mut cmd = command(SHELL); cmd.current_dir(&empty_dir) - .arg(sanitize_sh(&tarball.decompressed_output().join("install.sh"))) - .arg(format!("--prefix={}", prepare_dir(&destdir_env, prefix))) - .arg(format!("--sysconfdir={}", prepare_dir(&destdir_env, sysconfdir))) - .arg(format!("--datadir={}", prepare_dir(&destdir_env, datadir))) - .arg(format!("--docdir={}", prepare_dir(&destdir_env, docdir))) - .arg(format!("--bindir={}", prepare_dir(&destdir_env, bindir))) - .arg(format!("--libdir={}", prepare_dir(&destdir_env, libdir))) - .arg(format!("--mandir={}", prepare_dir(&destdir_env, mandir))) + .arg(sanitize_sh(&tarball.decompressed_output().join("install.sh"), is_cygwin)) + .arg(format!("--prefix={}", prepare_dir(&destdir_env, prefix, is_cygwin))) + .arg(format!("--sysconfdir={}", prepare_dir(&destdir_env, sysconfdir, is_cygwin))) + .arg(format!("--datadir={}", prepare_dir(&destdir_env, datadir, is_cygwin))) + .arg(format!("--docdir={}", prepare_dir(&destdir_env, docdir, is_cygwin))) + .arg(format!("--bindir={}", prepare_dir(&destdir_env, bindir, is_cygwin))) + .arg(format!("--libdir={}", prepare_dir(&destdir_env, libdir, is_cygwin))) + .arg(format!("--mandir={}", prepare_dir(&destdir_env, mandir, is_cygwin))) .arg("--disable-ldconfig"); cmd.run(builder); t!(fs::remove_dir_all(&empty_dir)); @@ -120,7 +121,7 @@ fn default_path(config: &Option, default: &str) -> PathBuf { config.as_ref().cloned().unwrap_or_else(|| PathBuf::from(default)) } -fn prepare_dir(destdir_env: &Option, mut path: PathBuf) -> String { +fn prepare_dir(destdir_env: &Option, mut path: PathBuf, is_cygwin: bool) -> String { // The DESTDIR environment variable is a standard way to install software in a subdirectory // while keeping the original directory structure, even if the prefix or other directories // contain absolute paths. @@ -146,7 +147,7 @@ fn prepare_dir(destdir_env: &Option, mut path: PathBuf) -> String { assert!(path.is_absolute(), "could not make the path relative"); } - sanitize_sh(&path) + sanitize_sh(&path, is_cygwin) } macro_rules! install { diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs index b06147055f2a7..a07d1597746c2 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs @@ -565,6 +565,12 @@ impl TargetSelection { self.ends_with("windows-gnu") } + pub fn is_cygwin(&self) -> bool { + self.is_windows() && + // ref. https://cygwin.com/pipermail/cygwin/2022-February/250802.html + env::var("OSTYPE").is_ok_and(|v| v.to_lowercase().contains("cygwin")) + } + /// Path to the file defining the custom target, if any. pub fn filepath(&self) -> Option<&Path> { self.file.as_ref().map(Path::new) diff --git a/src/tools/tidy/src/issues.txt b/src/tools/tidy/src/issues.txt index 3a021e189f330..25cd32063aab8 100644 --- a/src/tools/tidy/src/issues.txt +++ b/src/tools/tidy/src/issues.txt @@ -2295,8 +2295,6 @@ ui/issues/issue-43853.rs ui/issues/issue-4387.rs ui/issues/issue-43910.rs ui/issues/issue-43923.rs -ui/issues/issue-43925.rs -ui/issues/issue-43926.rs ui/issues/issue-43988.rs ui/issues/issue-44023.rs ui/issues/issue-44056.rs @@ -2545,8 +2543,6 @@ ui/issues/issue-6936.rs ui/issues/issue-69455.rs ui/issues/issue-69602-type-err-during-codegen-ice.rs ui/issues/issue-69683.rs -ui/issues/issue-70093/issue-70093-link-directives.rs -ui/issues/issue-70093/issue-70093.rs ui/issues/issue-7012.rs ui/issues/issue-70381.rs ui/issues/issue-7044.rs @@ -2711,11 +2707,15 @@ ui/limits/issue-17913.rs ui/limits/issue-55878.rs ui/limits/issue-69485-var-size-diffs-too-large.rs ui/limits/issue-75158-64.rs +ui/link-native-libs/issue-109144.rs +ui/link-native-libs/issue-43925.rs +ui/link-native-libs/issue-43926.rs +ui/link-native-libs/issue-70093/issue-70093-link-directives.rs +ui/link-native-libs/issue-70093/issue-70093.rs ui/linkage-attr/auxiliary/issue-12133-dylib.rs ui/linkage-attr/auxiliary/issue-12133-dylib2.rs ui/linkage-attr/auxiliary/issue-12133-rlib.rs ui/linkage-attr/issue-10755.rs -ui/linkage-attr/issue-109144.rs ui/linkage-attr/issue-12133-1.rs ui/linkage-attr/issue-12133-2.rs ui/linkage-attr/issue-12133-3.rs diff --git a/src/tools/tidy/src/ui_tests.rs b/src/tools/tidy/src/ui_tests.rs index 11f9d5bb03df7..401169c838f71 100644 --- a/src/tools/tidy/src/ui_tests.rs +++ b/src/tools/tidy/src/ui_tests.rs @@ -17,7 +17,7 @@ use ignore::Walk; const ENTRY_LIMIT: u32 = 901; // FIXME: The following limits should be reduced eventually. -const ISSUES_ENTRY_LIMIT: u32 = 1672; +const ISSUES_ENTRY_LIMIT: u32 = 1667; const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[ "rs", // test source files diff --git a/tests/run-make/libs-through-symlinks/Makefile b/tests/run-make/libs-through-symlinks/Makefile index 592eae663a49a..c6ff566a0e86e 100644 --- a/tests/run-make/libs-through-symlinks/Makefile +++ b/tests/run-make/libs-through-symlinks/Makefile @@ -3,10 +3,20 @@ include ../tools.mk # ignore-windows +# The option -n for the AIX ln command has a different purpose than it does +# on Linux. On Linux, the -n option is used to treat the destination path as +# normal file if it is a symbolic link to a directory, which is the default +# behavior of the AIX ln command. +ifeq ($(UNAME),AIX) +LN_FLAGS := -sf +else +LN_FLAGS := -nsf +endif + NAME := $(shell $(RUSTC) --print file-names foo.rs) all: mkdir -p $(TMPDIR)/outdir $(RUSTC) foo.rs -o $(TMPDIR)/outdir/$(NAME) - ln -nsf outdir/$(NAME) $(TMPDIR) + ln $(LN_FLAGS) outdir/$(NAME) $(TMPDIR) RUSTC_LOG=rustc_metadata::loader $(RUSTC) bar.rs diff --git a/tests/rustdoc-ui/issues/issue-107918.rs b/tests/rustdoc-ui/issues/duplicate-panic-impl-107918.rs similarity index 80% rename from tests/rustdoc-ui/issues/issue-107918.rs rename to tests/rustdoc-ui/issues/duplicate-panic-impl-107918.rs index 19d53f84cb66e..ec35b52e33b0d 100644 --- a/tests/rustdoc-ui/issues/issue-107918.rs +++ b/tests/rustdoc-ui/issues/duplicate-panic-impl-107918.rs @@ -2,6 +2,7 @@ //@ compile-flags: --document-private-items //@ build-pass //@ only-linux +// https://github.com/rust-lang/rust/issues/107918 #![no_std] #![no_main] diff --git a/tests/rustdoc-ui/issues/issue-110900.rs b/tests/rustdoc-ui/issues/ice-associated-type-bounds-110900.rs similarity index 88% rename from tests/rustdoc-ui/issues/issue-110900.rs rename to tests/rustdoc-ui/issues/ice-associated-type-bounds-110900.rs index 5a8961670833f..4fa60f8878d1d 100644 --- a/tests/rustdoc-ui/issues/issue-110900.rs +++ b/tests/rustdoc-ui/issues/ice-associated-type-bounds-110900.rs @@ -1,4 +1,5 @@ //@ check-pass +// https://github.com/rust-lang/rust/issues/110900 #![crate_type="lib"] diff --git a/tests/rustdoc-ui/issues/issue-106213.rs b/tests/rustdoc-ui/issues/ice-bare-dyn-106213.rs similarity index 77% rename from tests/rustdoc-ui/issues/issue-106213.rs rename to tests/rustdoc-ui/issues/ice-bare-dyn-106213.rs index 5c3a83902523f..c954162589d9e 100644 --- a/tests/rustdoc-ui/issues/issue-106213.rs +++ b/tests/rustdoc-ui/issues/ice-bare-dyn-106213.rs @@ -1,5 +1,6 @@ //@ compile-flags: --document-private-items //@ edition:2021 +// https://github.com/rust-lang/rust/issues/106213 fn use_avx() -> dyn { //~^ ERROR at least one trait is required for an object type diff --git a/tests/rustdoc-ui/issues/issue-106213.stderr b/tests/rustdoc-ui/issues/ice-bare-dyn-106213.stderr similarity index 85% rename from tests/rustdoc-ui/issues/issue-106213.stderr rename to tests/rustdoc-ui/issues/ice-bare-dyn-106213.stderr index fa79fe2e71c10..b029fee510ee9 100644 --- a/tests/rustdoc-ui/issues/issue-106213.stderr +++ b/tests/rustdoc-ui/issues/ice-bare-dyn-106213.stderr @@ -1,5 +1,5 @@ error[E0224]: at least one trait is required for an object type - --> $DIR/issue-106213.rs:4:17 + --> $DIR/ice-bare-dyn-106213.rs:5:17 | LL | fn use_avx() -> dyn { | ^^^ diff --git a/tests/rustdoc-ui/issues/issue-105742.rs b/tests/rustdoc-ui/issues/ice-generic-type-alias-105742.rs similarity index 98% rename from tests/rustdoc-ui/issues/issue-105742.rs rename to tests/rustdoc-ui/issues/ice-generic-type-alias-105742.rs index bd8ec4e8b589e..027574923c7ad 100644 --- a/tests/rustdoc-ui/issues/issue-105742.rs +++ b/tests/rustdoc-ui/issues/ice-generic-type-alias-105742.rs @@ -1,4 +1,5 @@ //@ compile-flags: -Znormalize-docs +// https://github.com/rust-lang/rust/issues/105742 use std::ops::Index; pub fn next<'a, T>(s: &'a mut dyn SVec) { diff --git a/tests/rustdoc-ui/issues/issue-105742.stderr b/tests/rustdoc-ui/issues/ice-generic-type-alias-105742.stderr similarity index 84% rename from tests/rustdoc-ui/issues/issue-105742.stderr rename to tests/rustdoc-ui/issues/ice-generic-type-alias-105742.stderr index 0f09d637f38fe..06a1cf6b118da 100644 --- a/tests/rustdoc-ui/issues/issue-105742.stderr +++ b/tests/rustdoc-ui/issues/ice-generic-type-alias-105742.stderr @@ -1,11 +1,11 @@ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:15:21 + --> $DIR/ice-generic-type-alias-105742.rs:16:21 | LL | ::Item, | ^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ -- @@ -15,13 +15,13 @@ LL | ::Item<'a>, | ++++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:15:21 + --> $DIR/ice-generic-type-alias-105742.rs:16:21 | LL | ::Item, | ^^^^ expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `T` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ - @@ -31,13 +31,13 @@ LL | ::Item, | +++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:26:37 + --> $DIR/ice-generic-type-alias-105742.rs:27:37 | LL | Output = ::Item, | ^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ -- @@ -47,13 +47,13 @@ LL | Output = ::Item<'a>, | ++++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:26:37 + --> $DIR/ice-generic-type-alias-105742.rs:27:37 | LL | Output = ::Item, | ^^^^ expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `T` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ - @@ -63,13 +63,13 @@ LL | Output = ::Item, | +++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:37:30 + --> $DIR/ice-generic-type-alias-105742.rs:38:30 | LL | Output = ::Item> as SVec>::Item, | ^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ -- @@ -79,13 +79,13 @@ LL | Output = ::Item<'a>> as SVec>::Item, | ++++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:37:30 + --> $DIR/ice-generic-type-alias-105742.rs:38:30 | LL | Output = ::Item> as SVec>::Item, | ^^^^ expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `T` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ - @@ -95,13 +95,13 @@ LL | Output = ::Item> as SVec>::Item, | +++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:37:46 + --> $DIR/ice-generic-type-alias-105742.rs:38:46 | LL | Output = ::Item> as SVec>::Item, | ^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ -- @@ -111,13 +111,13 @@ LL | Output = ::Item> as SVec>::Item<'a>, | ++++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:37:46 + --> $DIR/ice-generic-type-alias-105742.rs:38:46 | LL | Output = ::Item> as SVec>::Item, | ^^^^ expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `T` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ - @@ -127,13 +127,13 @@ LL | Output = ::Item> as SVec>::Item, | +++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:4:40 + --> $DIR/ice-generic-type-alias-105742.rs:5:40 | LL | pub fn next<'a, T>(s: &'a mut dyn SVec) { | ^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ -- @@ -143,13 +143,13 @@ LL | pub fn next<'a, T>(s: &'a mut dyn SVec = T, Output = T>) { | ++++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:4:40 + --> $DIR/ice-generic-type-alias-105742.rs:5:40 | LL | pub fn next<'a, T>(s: &'a mut dyn SVec) { | ^^^^ expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `T` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ - @@ -159,13 +159,13 @@ LL | pub fn next<'a, T>(s: &'a mut dyn SVec = T, Output = T>) { | +++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:15:21 + --> $DIR/ice-generic-type-alias-105742.rs:16:21 | LL | ::Item, | ^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ -- @@ -176,13 +176,13 @@ LL | ::Item<'a>, | ++++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:15:21 + --> $DIR/ice-generic-type-alias-105742.rs:16:21 | LL | ::Item, | ^^^^ expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `T` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ - @@ -193,13 +193,13 @@ LL | ::Item, | +++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:26:37 + --> $DIR/ice-generic-type-alias-105742.rs:27:37 | LL | Output = ::Item, | ^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ -- @@ -210,13 +210,13 @@ LL | Output = ::Item<'a>, | ++++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:26:37 + --> $DIR/ice-generic-type-alias-105742.rs:27:37 | LL | Output = ::Item, | ^^^^ expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `T` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ - @@ -227,13 +227,13 @@ LL | Output = ::Item, | +++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:37:30 + --> $DIR/ice-generic-type-alias-105742.rs:38:30 | LL | Output = ::Item> as SVec>::Item, | ^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ -- @@ -244,13 +244,13 @@ LL | Output = ::Item<'a>> as SVec>::Item, | ++++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:37:30 + --> $DIR/ice-generic-type-alias-105742.rs:38:30 | LL | Output = ::Item> as SVec>::Item, | ^^^^ expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `T` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ - @@ -261,13 +261,13 @@ LL | Output = ::Item> as SVec>::Item, | +++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:37:46 + --> $DIR/ice-generic-type-alias-105742.rs:38:46 | LL | Output = ::Item> as SVec>::Item, | ^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ -- @@ -278,13 +278,13 @@ LL | Output = ::Item> as SVec>::Item<'a>, | ++++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:37:46 + --> $DIR/ice-generic-type-alias-105742.rs:38:46 | LL | Output = ::Item> as SVec>::Item, | ^^^^ expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `T` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ - @@ -295,13 +295,13 @@ LL | Output = ::Item> as SVec>::Item, | +++ error[E0038]: the trait `SVec` cannot be made into an object - --> $DIR/issue-105742.rs:4:31 + --> $DIR/ice-generic-type-alias-105742.rs:5:31 | LL | pub fn next<'a, T>(s: &'a mut dyn SVec) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `SVec` cannot be made into an object | note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit - --> $DIR/issue-105742.rs:14:17 + --> $DIR/ice-generic-type-alias-105742.rs:15:17 | LL | pub trait SVec: Index< | ____________----__^ @@ -329,13 +329,13 @@ LL | pub fn next<'a, T>(s: &'a mut impl SVec) { | ~~~~ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:15:21 + --> $DIR/ice-generic-type-alias-105742.rs:16:21 | LL | ::Item, | ^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ -- @@ -346,13 +346,13 @@ LL | ::Item<'a>, | ++++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:15:21 + --> $DIR/ice-generic-type-alias-105742.rs:16:21 | LL | ::Item, | ^^^^ expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `T` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ - @@ -363,13 +363,13 @@ LL | ::Item, | +++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:26:37 + --> $DIR/ice-generic-type-alias-105742.rs:27:37 | LL | Output = ::Item, | ^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ -- @@ -380,13 +380,13 @@ LL | Output = ::Item<'a>, | ++++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:26:37 + --> $DIR/ice-generic-type-alias-105742.rs:27:37 | LL | Output = ::Item, | ^^^^ expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `T` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ - @@ -397,13 +397,13 @@ LL | Output = ::Item, | +++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:37:30 + --> $DIR/ice-generic-type-alias-105742.rs:38:30 | LL | Output = ::Item> as SVec>::Item, | ^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ -- @@ -414,13 +414,13 @@ LL | Output = ::Item<'a>> as SVec>::Item, | ++++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:37:30 + --> $DIR/ice-generic-type-alias-105742.rs:38:30 | LL | Output = ::Item> as SVec>::Item, | ^^^^ expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `T` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ - @@ -431,13 +431,13 @@ LL | Output = ::Item> as SVec>::Item, | +++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:37:46 + --> $DIR/ice-generic-type-alias-105742.rs:38:46 | LL | Output = ::Item> as SVec>::Item, | ^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ -- @@ -448,13 +448,13 @@ LL | Output = ::Item> as SVec>::Item<'a>, | ++++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:37:46 + --> $DIR/ice-generic-type-alias-105742.rs:38:46 | LL | Output = ::Item> as SVec>::Item, | ^^^^ expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `T` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ - @@ -465,13 +465,13 @@ LL | Output = ::Item> as SVec>::Item, | +++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:15:21 + --> $DIR/ice-generic-type-alias-105742.rs:16:21 | LL | ::Item, | ^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ -- @@ -482,13 +482,13 @@ LL | ::Item<'a>, | ++++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:15:21 + --> $DIR/ice-generic-type-alias-105742.rs:16:21 | LL | ::Item, | ^^^^ expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `T` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ - @@ -499,13 +499,13 @@ LL | ::Item, | +++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:26:37 + --> $DIR/ice-generic-type-alias-105742.rs:27:37 | LL | Output = ::Item, | ^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ -- @@ -516,13 +516,13 @@ LL | Output = ::Item<'a>, | ++++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:26:37 + --> $DIR/ice-generic-type-alias-105742.rs:27:37 | LL | Output = ::Item, | ^^^^ expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `T` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ - @@ -533,13 +533,13 @@ LL | Output = ::Item, | +++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:37:30 + --> $DIR/ice-generic-type-alias-105742.rs:38:30 | LL | Output = ::Item> as SVec>::Item, | ^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ -- @@ -550,13 +550,13 @@ LL | Output = ::Item<'a>> as SVec>::Item, | ++++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:37:30 + --> $DIR/ice-generic-type-alias-105742.rs:38:30 | LL | Output = ::Item> as SVec>::Item, | ^^^^ expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `T` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ - @@ -567,13 +567,13 @@ LL | Output = ::Item> as SVec>::Item, | +++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:37:46 + --> $DIR/ice-generic-type-alias-105742.rs:38:46 | LL | Output = ::Item> as SVec>::Item, | ^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ -- @@ -584,13 +584,13 @@ LL | Output = ::Item> as SVec>::Item<'a>, | ++++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:37:46 + --> $DIR/ice-generic-type-alias-105742.rs:38:46 | LL | Output = ::Item> as SVec>::Item, | ^^^^ expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `T` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ - @@ -601,13 +601,13 @@ LL | Output = ::Item> as SVec>::Item, | +++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:61:38 + --> $DIR/ice-generic-type-alias-105742.rs:62:38 | LL | fn len(&self) -> ::Item; | ^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ -- @@ -617,13 +617,13 @@ LL | fn len(&self) -> ::Item<'_>; | ++++ error[E0107]: missing generics for associated type `SVec::Item` - --> $DIR/issue-105742.rs:61:38 + --> $DIR/ice-generic-type-alias-105742.rs:62:38 | LL | fn len(&self) -> ::Item; | ^^^^ expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `T` - --> $DIR/issue-105742.rs:59:10 + --> $DIR/ice-generic-type-alias-105742.rs:60:10 | LL | type Item<'a, T>; | ^^^^ - diff --git a/tests/rustdoc-ui/issues/ice-impl-fn-generic-105737.rs b/tests/rustdoc-ui/issues/ice-impl-fn-generic-105737.rs new file mode 100644 index 0000000000000..651fd9ab4b8b3 --- /dev/null +++ b/tests/rustdoc-ui/issues/ice-impl-fn-generic-105737.rs @@ -0,0 +1,5 @@ +// https://github.com/rust-lang/rust/issues/105737 +impl Vec {} +//~^ ERROR + +pub fn lol() {} diff --git a/tests/rustdoc-ui/issues/issue-105737.stderr b/tests/rustdoc-ui/issues/ice-impl-fn-generic-105737.stderr similarity index 87% rename from tests/rustdoc-ui/issues/issue-105737.stderr rename to tests/rustdoc-ui/issues/ice-impl-fn-generic-105737.stderr index 2c63c345e46a5..49cbebc91d982 100644 --- a/tests/rustdoc-ui/issues/issue-105737.stderr +++ b/tests/rustdoc-ui/issues/ice-impl-fn-generic-105737.stderr @@ -1,5 +1,5 @@ error[E0747]: constant provided when a type was expected - --> $DIR/issue-105737.rs:1:10 + --> $DIR/ice-impl-fn-generic-105737.rs:2:10 | LL | impl Vec {} | ^^^ diff --git a/tests/rustdoc-ui/issues/issue-101076.rs b/tests/rustdoc-ui/issues/ice-macro-hidden-exported-macro-defid-101076.rs similarity index 81% rename from tests/rustdoc-ui/issues/issue-101076.rs rename to tests/rustdoc-ui/issues/ice-macro-hidden-exported-macro-defid-101076.rs index f9b93c408fd68..0c9a8b9175b3d 100644 --- a/tests/rustdoc-ui/issues/issue-101076.rs +++ b/tests/rustdoc-ui/issues/ice-macro-hidden-exported-macro-defid-101076.rs @@ -1,4 +1,5 @@ //@ check-pass +// https://github.com/rust-lang/rust/issues/101076 const _: () = { #[macro_export] diff --git a/tests/rustdoc-ui/issues/issue-106226.rs b/tests/rustdoc-ui/issues/ice-placeholder-type-alias-106226.rs similarity index 100% rename from tests/rustdoc-ui/issues/issue-106226.rs rename to tests/rustdoc-ui/issues/ice-placeholder-type-alias-106226.rs diff --git a/tests/rustdoc-ui/issues/issue-106226.stderr b/tests/rustdoc-ui/issues/ice-placeholder-type-alias-106226.stderr similarity index 84% rename from tests/rustdoc-ui/issues/issue-106226.stderr rename to tests/rustdoc-ui/issues/ice-placeholder-type-alias-106226.stderr index 4d063b461883a..e90809254504e 100644 --- a/tests/rustdoc-ui/issues/issue-106226.stderr +++ b/tests/rustdoc-ui/issues/ice-placeholder-type-alias-106226.stderr @@ -1,5 +1,5 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures for type aliases - --> $DIR/issue-106226.rs:2:11 + --> $DIR/ice-placeholder-type-alias-106226.rs:2:11 | LL | type F = [_; ()]; | ^ not allowed in type signatures diff --git a/tests/rustdoc-ui/issues/ice-raw-str-105334.rs b/tests/rustdoc-ui/issues/ice-raw-str-105334.rs new file mode 100644 index 0000000000000..f18f0456fdde8 --- /dev/null +++ b/tests/rustdoc-ui/issues/ice-raw-str-105334.rs @@ -0,0 +1,3 @@ +// https://github.com/rust-lang/rust/issues/105334 +impl Vec< br##"*.."## > {} +//~^ ERROR diff --git a/tests/rustdoc-ui/issues/issue-105334.stderr b/tests/rustdoc-ui/issues/ice-raw-str-105334.stderr similarity index 85% rename from tests/rustdoc-ui/issues/issue-105334.stderr rename to tests/rustdoc-ui/issues/ice-raw-str-105334.stderr index d992b219b3bc2..2096757fbb98e 100644 --- a/tests/rustdoc-ui/issues/issue-105334.stderr +++ b/tests/rustdoc-ui/issues/ice-raw-str-105334.stderr @@ -1,5 +1,5 @@ error[E0747]: constant provided when a type was expected - --> $DIR/issue-105334.rs:1:11 + --> $DIR/ice-raw-str-105334.rs:2:11 | LL | impl Vec< br##"*.."## > {} | ^^^^^^^^^^^ diff --git a/tests/rustdoc-ui/issues/issue-102986.rs b/tests/rustdoc-ui/issues/ice-typeof-102986.rs similarity index 66% rename from tests/rustdoc-ui/issues/issue-102986.rs rename to tests/rustdoc-ui/issues/ice-typeof-102986.rs index 001784ac28561..8fcbfffe17246 100644 --- a/tests/rustdoc-ui/issues/issue-102986.rs +++ b/tests/rustdoc-ui/issues/ice-typeof-102986.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/102986 struct Struct { y: (typeof("hey"),), //~^ `typeof` is a reserved keyword but unimplemented diff --git a/tests/rustdoc-ui/issues/issue-102986.stderr b/tests/rustdoc-ui/issues/ice-typeof-102986.stderr similarity index 90% rename from tests/rustdoc-ui/issues/issue-102986.stderr rename to tests/rustdoc-ui/issues/ice-typeof-102986.stderr index d91f93f394a5b..20dbb2661bc2e 100644 --- a/tests/rustdoc-ui/issues/issue-102986.stderr +++ b/tests/rustdoc-ui/issues/ice-typeof-102986.stderr @@ -1,5 +1,5 @@ error[E0516]: `typeof` is a reserved keyword but unimplemented - --> $DIR/issue-102986.rs:2:9 + --> $DIR/ice-typeof-102986.rs:3:9 | LL | y: (typeof("hey"),), | ^^^^^^^^^^^^^ reserved keyword diff --git a/tests/rustdoc-ui/issues/issue-103997.rs b/tests/rustdoc-ui/issues/ice-unresolved-self-103997.rs similarity index 70% rename from tests/rustdoc-ui/issues/issue-103997.rs rename to tests/rustdoc-ui/issues/ice-unresolved-self-103997.rs index ebd1d2e4447d8..b6ba4e48cffd6 100644 --- a/tests/rustdoc-ui/issues/issue-103997.rs +++ b/tests/rustdoc-ui/issues/ice-unresolved-self-103997.rs @@ -1,4 +1,5 @@ //@ check-pass +// https://github.com/rust-lang/rust/issues/103997 pub fn foo() {} diff --git a/tests/rustdoc-ui/issues/issue-103997.stderr b/tests/rustdoc-ui/issues/ice-unresolved-self-103997.stderr similarity index 83% rename from tests/rustdoc-ui/issues/issue-103997.stderr rename to tests/rustdoc-ui/issues/ice-unresolved-self-103997.stderr index c06db91496f86..9cb64079c618c 100644 --- a/tests/rustdoc-ui/issues/issue-103997.stderr +++ b/tests/rustdoc-ui/issues/ice-unresolved-self-103997.stderr @@ -1,5 +1,5 @@ warning: unresolved link to `Self::foo` - --> $DIR/issue-103997.rs:5:13 + --> $DIR/ice-unresolved-self-103997.rs:6:13 | LL | /// [`foo`](Self::foo) | ^^^^^^^^^ no item named `Self` in scope diff --git a/tests/rustdoc-ui/issues/issue-105334.rs b/tests/rustdoc-ui/issues/issue-105334.rs deleted file mode 100644 index ee1adc6a02914..0000000000000 --- a/tests/rustdoc-ui/issues/issue-105334.rs +++ /dev/null @@ -1,2 +0,0 @@ -impl Vec< br##"*.."## > {} -//~^ ERROR diff --git a/tests/rustdoc-ui/issues/issue-105737.rs b/tests/rustdoc-ui/issues/issue-105737.rs deleted file mode 100644 index 154f069d8ffac..0000000000000 --- a/tests/rustdoc-ui/issues/issue-105737.rs +++ /dev/null @@ -1,4 +0,0 @@ -impl Vec {} -//~^ ERROR - -pub fn lol() {} diff --git a/tests/ui/async-await/async-closures/call-once-deduction.rs b/tests/ui/async-await/async-closures/call-once-deduction.rs new file mode 100644 index 0000000000000..41d92bc3d786c --- /dev/null +++ b/tests/ui/async-await/async-closures/call-once-deduction.rs @@ -0,0 +1,14 @@ +//@ edition: 2021 +//@ check-pass + +#![feature(async_closure, async_fn_traits, unboxed_closures)] + +fn bar(_: F) +where + F: AsyncFnOnce<(), CallOnceFuture = O>, +{ +} + +fn main() { + bar(async move || {}); +} diff --git a/tests/ui/linkage-attr/auxiliary/link-cfg-works-transitive-dylib.rs b/tests/ui/link-native-libs/auxiliary/link-cfg-works-transitive-dylib.rs similarity index 100% rename from tests/ui/linkage-attr/auxiliary/link-cfg-works-transitive-dylib.rs rename to tests/ui/link-native-libs/auxiliary/link-cfg-works-transitive-dylib.rs diff --git a/tests/ui/linkage-attr/auxiliary/link-cfg-works-transitive-rlib.rs b/tests/ui/link-native-libs/auxiliary/link-cfg-works-transitive-rlib.rs similarity index 100% rename from tests/ui/linkage-attr/auxiliary/link-cfg-works-transitive-rlib.rs rename to tests/ui/link-native-libs/auxiliary/link-cfg-works-transitive-rlib.rs diff --git a/tests/ui/native-library-link-flags/empty-kind-1.rs b/tests/ui/link-native-libs/empty-kind-1.rs similarity index 100% rename from tests/ui/native-library-link-flags/empty-kind-1.rs rename to tests/ui/link-native-libs/empty-kind-1.rs diff --git a/tests/ui/native-library-link-flags/empty-kind-1.stderr b/tests/ui/link-native-libs/empty-kind-1.stderr similarity index 100% rename from tests/ui/native-library-link-flags/empty-kind-1.stderr rename to tests/ui/link-native-libs/empty-kind-1.stderr diff --git a/tests/ui/native-library-link-flags/empty-kind-2.rs b/tests/ui/link-native-libs/empty-kind-2.rs similarity index 100% rename from tests/ui/native-library-link-flags/empty-kind-2.rs rename to tests/ui/link-native-libs/empty-kind-2.rs diff --git a/tests/ui/native-library-link-flags/empty-kind-2.stderr b/tests/ui/link-native-libs/empty-kind-2.stderr similarity index 100% rename from tests/ui/native-library-link-flags/empty-kind-2.stderr rename to tests/ui/link-native-libs/empty-kind-2.stderr diff --git a/tests/ui/linkage-attr/issue-109144.rs b/tests/ui/link-native-libs/issue-109144.rs similarity index 100% rename from tests/ui/linkage-attr/issue-109144.rs rename to tests/ui/link-native-libs/issue-109144.rs diff --git a/tests/ui/linkage-attr/issue-109144.stderr b/tests/ui/link-native-libs/issue-109144.stderr similarity index 100% rename from tests/ui/linkage-attr/issue-109144.stderr rename to tests/ui/link-native-libs/issue-109144.stderr diff --git a/tests/ui/issues/issue-43925.rs b/tests/ui/link-native-libs/issue-43925.rs similarity index 100% rename from tests/ui/issues/issue-43925.rs rename to tests/ui/link-native-libs/issue-43925.rs diff --git a/tests/ui/issues/issue-43925.stderr b/tests/ui/link-native-libs/issue-43925.stderr similarity index 100% rename from tests/ui/issues/issue-43925.stderr rename to tests/ui/link-native-libs/issue-43925.stderr diff --git a/tests/ui/issues/issue-43926.rs b/tests/ui/link-native-libs/issue-43926.rs similarity index 100% rename from tests/ui/issues/issue-43926.rs rename to tests/ui/link-native-libs/issue-43926.rs diff --git a/tests/ui/issues/issue-43926.stderr b/tests/ui/link-native-libs/issue-43926.stderr similarity index 100% rename from tests/ui/issues/issue-43926.stderr rename to tests/ui/link-native-libs/issue-43926.stderr diff --git a/tests/ui/issues/issue-70093/issue-70093-link-directives.rs b/tests/ui/link-native-libs/issue-70093/issue-70093-link-directives.rs similarity index 100% rename from tests/ui/issues/issue-70093/issue-70093-link-directives.rs rename to tests/ui/link-native-libs/issue-70093/issue-70093-link-directives.rs diff --git a/tests/ui/issues/issue-70093/issue-70093.rs b/tests/ui/link-native-libs/issue-70093/issue-70093.rs similarity index 100% rename from tests/ui/issues/issue-70093/issue-70093.rs rename to tests/ui/link-native-libs/issue-70093/issue-70093.rs diff --git a/tests/ui/linkage-attr/kind-framework.rs b/tests/ui/link-native-libs/kind-framework.rs similarity index 100% rename from tests/ui/linkage-attr/kind-framework.rs rename to tests/ui/link-native-libs/kind-framework.rs diff --git a/tests/ui/linkage-attr/kind-framework.stderr b/tests/ui/link-native-libs/kind-framework.stderr similarity index 100% rename from tests/ui/linkage-attr/kind-framework.stderr rename to tests/ui/link-native-libs/kind-framework.stderr diff --git a/tests/ui/native-library-link-flags/link-arg-error.rs b/tests/ui/link-native-libs/link-arg-error.rs similarity index 100% rename from tests/ui/native-library-link-flags/link-arg-error.rs rename to tests/ui/link-native-libs/link-arg-error.rs diff --git a/tests/ui/native-library-link-flags/link-arg-error.stderr b/tests/ui/link-native-libs/link-arg-error.stderr similarity index 100% rename from tests/ui/native-library-link-flags/link-arg-error.stderr rename to tests/ui/link-native-libs/link-arg-error.stderr diff --git a/tests/ui/native-library-link-flags/link-arg-from-rs.rs b/tests/ui/link-native-libs/link-arg-from-rs.rs similarity index 100% rename from tests/ui/native-library-link-flags/link-arg-from-rs.rs rename to tests/ui/link-native-libs/link-arg-from-rs.rs diff --git a/tests/ui/native-library-link-flags/link-arg-from-rs.stderr b/tests/ui/link-native-libs/link-arg-from-rs.stderr similarity index 100% rename from tests/ui/native-library-link-flags/link-arg-from-rs.stderr rename to tests/ui/link-native-libs/link-arg-from-rs.stderr diff --git a/tests/ui/linkage-attr/link-attr-validation-early.rs b/tests/ui/link-native-libs/link-attr-validation-early.rs similarity index 100% rename from tests/ui/linkage-attr/link-attr-validation-early.rs rename to tests/ui/link-native-libs/link-attr-validation-early.rs diff --git a/tests/ui/linkage-attr/link-attr-validation-early.stderr b/tests/ui/link-native-libs/link-attr-validation-early.stderr similarity index 100% rename from tests/ui/linkage-attr/link-attr-validation-early.stderr rename to tests/ui/link-native-libs/link-attr-validation-early.stderr diff --git a/tests/ui/linkage-attr/link-attr-validation-late.rs b/tests/ui/link-native-libs/link-attr-validation-late.rs similarity index 100% rename from tests/ui/linkage-attr/link-attr-validation-late.rs rename to tests/ui/link-native-libs/link-attr-validation-late.rs diff --git a/tests/ui/linkage-attr/link-attr-validation-late.stderr b/tests/ui/link-native-libs/link-attr-validation-late.stderr similarity index 100% rename from tests/ui/linkage-attr/link-attr-validation-late.stderr rename to tests/ui/link-native-libs/link-attr-validation-late.stderr diff --git a/tests/ui/linkage-attr/link-cfg-works.rs b/tests/ui/link-native-libs/link-cfg-works.rs similarity index 100% rename from tests/ui/linkage-attr/link-cfg-works.rs rename to tests/ui/link-native-libs/link-cfg-works.rs diff --git a/tests/ui/manual/manual-link-bad-form.rs b/tests/ui/link-native-libs/manual-link-bad-form.rs similarity index 100% rename from tests/ui/manual/manual-link-bad-form.rs rename to tests/ui/link-native-libs/manual-link-bad-form.rs diff --git a/tests/ui/manual/manual-link-bad-form.stderr b/tests/ui/link-native-libs/manual-link-bad-form.stderr similarity index 100% rename from tests/ui/manual/manual-link-bad-form.stderr rename to tests/ui/link-native-libs/manual-link-bad-form.stderr diff --git a/tests/ui/manual/manual-link-bad-kind.rs b/tests/ui/link-native-libs/manual-link-bad-kind.rs similarity index 100% rename from tests/ui/manual/manual-link-bad-kind.rs rename to tests/ui/link-native-libs/manual-link-bad-kind.rs diff --git a/tests/ui/manual/manual-link-bad-kind.stderr b/tests/ui/link-native-libs/manual-link-bad-kind.stderr similarity index 100% rename from tests/ui/manual/manual-link-bad-kind.stderr rename to tests/ui/link-native-libs/manual-link-bad-kind.stderr diff --git a/tests/ui/manual/manual-link-bad-search-path.rs b/tests/ui/link-native-libs/manual-link-bad-search-path.rs similarity index 100% rename from tests/ui/manual/manual-link-bad-search-path.rs rename to tests/ui/link-native-libs/manual-link-bad-search-path.rs diff --git a/tests/ui/manual/manual-link-bad-search-path.stderr b/tests/ui/link-native-libs/manual-link-bad-search-path.stderr similarity index 100% rename from tests/ui/manual/manual-link-bad-search-path.stderr rename to tests/ui/link-native-libs/manual-link-bad-search-path.stderr diff --git a/tests/ui/manual/manual-link-framework.rs b/tests/ui/link-native-libs/manual-link-framework.rs similarity index 100% rename from tests/ui/manual/manual-link-framework.rs rename to tests/ui/link-native-libs/manual-link-framework.rs diff --git a/tests/ui/manual/manual-link-framework.stderr b/tests/ui/link-native-libs/manual-link-framework.stderr similarity index 100% rename from tests/ui/manual/manual-link-framework.stderr rename to tests/ui/link-native-libs/manual-link-framework.stderr diff --git a/tests/ui/manual/manual-link-unsupported-kind.rs b/tests/ui/link-native-libs/manual-link-unsupported-kind.rs similarity index 100% rename from tests/ui/manual/manual-link-unsupported-kind.rs rename to tests/ui/link-native-libs/manual-link-unsupported-kind.rs diff --git a/tests/ui/manual/manual-link-unsupported-kind.stderr b/tests/ui/link-native-libs/manual-link-unsupported-kind.stderr similarity index 100% rename from tests/ui/manual/manual-link-unsupported-kind.stderr rename to tests/ui/link-native-libs/manual-link-unsupported-kind.stderr diff --git a/tests/ui/native-library-link-flags/modifiers-bad.blank.stderr b/tests/ui/link-native-libs/modifiers-bad.blank.stderr similarity index 100% rename from tests/ui/native-library-link-flags/modifiers-bad.blank.stderr rename to tests/ui/link-native-libs/modifiers-bad.blank.stderr diff --git a/tests/ui/native-library-link-flags/modifiers-bad.no-prefix.stderr b/tests/ui/link-native-libs/modifiers-bad.no-prefix.stderr similarity index 100% rename from tests/ui/native-library-link-flags/modifiers-bad.no-prefix.stderr rename to tests/ui/link-native-libs/modifiers-bad.no-prefix.stderr diff --git a/tests/ui/native-library-link-flags/modifiers-bad.prefix-only.stderr b/tests/ui/link-native-libs/modifiers-bad.prefix-only.stderr similarity index 100% rename from tests/ui/native-library-link-flags/modifiers-bad.prefix-only.stderr rename to tests/ui/link-native-libs/modifiers-bad.prefix-only.stderr diff --git a/tests/ui/native-library-link-flags/modifiers-bad.rs b/tests/ui/link-native-libs/modifiers-bad.rs similarity index 100% rename from tests/ui/native-library-link-flags/modifiers-bad.rs rename to tests/ui/link-native-libs/modifiers-bad.rs diff --git a/tests/ui/native-library-link-flags/modifiers-bad.unknown.stderr b/tests/ui/link-native-libs/modifiers-bad.unknown.stderr similarity index 100% rename from tests/ui/native-library-link-flags/modifiers-bad.unknown.stderr rename to tests/ui/link-native-libs/modifiers-bad.unknown.stderr diff --git a/tests/ui/native-library-link-flags/modifiers-override-2.rs b/tests/ui/link-native-libs/modifiers-override-2.rs similarity index 100% rename from tests/ui/native-library-link-flags/modifiers-override-2.rs rename to tests/ui/link-native-libs/modifiers-override-2.rs diff --git a/tests/ui/native-library-link-flags/modifiers-override-2.stderr b/tests/ui/link-native-libs/modifiers-override-2.stderr similarity index 100% rename from tests/ui/native-library-link-flags/modifiers-override-2.stderr rename to tests/ui/link-native-libs/modifiers-override-2.stderr diff --git a/tests/ui/native-library-link-flags/modifiers-override-3.rs b/tests/ui/link-native-libs/modifiers-override-3.rs similarity index 100% rename from tests/ui/native-library-link-flags/modifiers-override-3.rs rename to tests/ui/link-native-libs/modifiers-override-3.rs diff --git a/tests/ui/native-library-link-flags/modifiers-override-3.stderr b/tests/ui/link-native-libs/modifiers-override-3.stderr similarity index 100% rename from tests/ui/native-library-link-flags/modifiers-override-3.stderr rename to tests/ui/link-native-libs/modifiers-override-3.stderr diff --git a/tests/ui/native-library-link-flags/modifiers-override.rs b/tests/ui/link-native-libs/modifiers-override.rs similarity index 100% rename from tests/ui/native-library-link-flags/modifiers-override.rs rename to tests/ui/link-native-libs/modifiers-override.rs diff --git a/tests/ui/native-library-link-flags/modifiers-override.stderr b/tests/ui/link-native-libs/modifiers-override.stderr similarity index 100% rename from tests/ui/native-library-link-flags/modifiers-override.stderr rename to tests/ui/link-native-libs/modifiers-override.stderr diff --git a/tests/ui/native-library-link-flags/msvc-non-utf8-output.rs b/tests/ui/link-native-libs/msvc-non-utf8-output.rs similarity index 100% rename from tests/ui/native-library-link-flags/msvc-non-utf8-output.rs rename to tests/ui/link-native-libs/msvc-non-utf8-output.rs diff --git a/tests/ui/native-library-link-flags/msvc-non-utf8-output.stderr b/tests/ui/link-native-libs/msvc-non-utf8-output.stderr similarity index 100% rename from tests/ui/native-library-link-flags/msvc-non-utf8-output.stderr rename to tests/ui/link-native-libs/msvc-non-utf8-output.stderr diff --git a/tests/ui/native-library-link-flags/suggest-libname-only-1.rs b/tests/ui/link-native-libs/suggest-libname-only-1.rs similarity index 100% rename from tests/ui/native-library-link-flags/suggest-libname-only-1.rs rename to tests/ui/link-native-libs/suggest-libname-only-1.rs diff --git a/tests/ui/native-library-link-flags/suggest-libname-only-1.stderr b/tests/ui/link-native-libs/suggest-libname-only-1.stderr similarity index 100% rename from tests/ui/native-library-link-flags/suggest-libname-only-1.stderr rename to tests/ui/link-native-libs/suggest-libname-only-1.stderr diff --git a/tests/ui/native-library-link-flags/suggest-libname-only-2.rs b/tests/ui/link-native-libs/suggest-libname-only-2.rs similarity index 100% rename from tests/ui/native-library-link-flags/suggest-libname-only-2.rs rename to tests/ui/link-native-libs/suggest-libname-only-2.rs diff --git a/tests/ui/native-library-link-flags/suggest-libname-only-2.stderr b/tests/ui/link-native-libs/suggest-libname-only-2.stderr similarity index 100% rename from tests/ui/native-library-link-flags/suggest-libname-only-2.stderr rename to tests/ui/link-native-libs/suggest-libname-only-2.stderr diff --git a/tests/ui/linkage-attr/uikit-framework.rs b/tests/ui/link-native-libs/uikit-framework.rs similarity index 100% rename from tests/ui/linkage-attr/uikit-framework.rs rename to tests/ui/link-native-libs/uikit-framework.rs diff --git a/tests/ui/runtime/on-broken-pipe/auxiliary/assert-sigpipe-disposition.rs b/tests/ui/runtime/on-broken-pipe/auxiliary/assert-sigpipe-disposition.rs index 117f6134b4e03..229408fb72474 100644 --- a/tests/ui/runtime/on-broken-pipe/auxiliary/assert-sigpipe-disposition.rs +++ b/tests/ui/runtime/on-broken-pipe/auxiliary/assert-sigpipe-disposition.rs @@ -25,7 +25,14 @@ fn start(argc: isize, argv: *const *const u8) -> isize { let actual = unsafe { let mut actual: libc::sigaction = std::mem::zeroed(); libc::sigaction(libc::SIGPIPE, std::ptr::null(), &mut actual); - actual.sa_sigaction + #[cfg(not(target_os = "aix"))] + { + actual.sa_sigaction + } + #[cfg(target_os = "aix")] + { + actual.sa_union.__su_sigaction as libc::sighandler_t + } }; assert_eq!(actual, expected, "actual and expected SIGPIPE disposition in child differs"); diff --git a/tests/ui/runtime/on-broken-pipe/auxiliary/sigpipe-utils.rs b/tests/ui/runtime/on-broken-pipe/auxiliary/sigpipe-utils.rs index 3d93d50ca3fbb..d16a2b4d8c8ab 100644 --- a/tests/ui/runtime/on-broken-pipe/auxiliary/sigpipe-utils.rs +++ b/tests/ui/runtime/on-broken-pipe/auxiliary/sigpipe-utils.rs @@ -20,7 +20,14 @@ pub fn assert_sigpipe_handler(expected_handler: SignalHandler) { let actual = unsafe { let mut actual: libc::sigaction = std::mem::zeroed(); libc::sigaction(libc::SIGPIPE, std::ptr::null(), &mut actual); - actual.sa_sigaction + #[cfg(not(target_os = "aix"))] + { + actual.sa_sigaction + } + #[cfg(target_os = "aix")] + { + actual.sa_union.__su_sigaction as libc::sighandler_t + } }; let expected = match expected_handler { diff --git a/tests/ui/runtime/signal-alternate-stack-cleanup.rs b/tests/ui/runtime/signal-alternate-stack-cleanup.rs index f2af86be0a5f5..8fce092827318 100644 --- a/tests/ui/runtime/signal-alternate-stack-cleanup.rs +++ b/tests/ui/runtime/signal-alternate-stack-cleanup.rs @@ -29,7 +29,14 @@ fn main() { // Install signal handler that runs on alternate signal stack. let mut action: sigaction = std::mem::zeroed(); action.sa_flags = (SA_ONSTACK | SA_SIGINFO) as _; - action.sa_sigaction = signal_handler as sighandler_t; + #[cfg(not(target_os = "aix"))] + { + action.sa_sigaction = signal_handler as sighandler_t; + } + #[cfg(target_os = "aix")] + { + action.sa_union.__su_sigaction = signal_handler as sighandler_t; + } sigaction(SIGWINCH, &action, std::ptr::null_mut()); // Send SIGWINCH on exit.