8000 Rollup of 6 pull requests by matthiaskrgr · Pull Request #93085 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Rollup of 6 pull requests #93085

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 32 commits into from
Jan 20, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
0490e43
Implement check_stream nonrecursively
dtolnay Jan 19, 2022
a37d272
Implement check_stack nonrecursively
dtolnay Jan 19, 2022
377c9db
Index a single time in check_stack
dtolnay Jan 19, 2022
fe5c4ea
Eliminate a check_stack call on an empty scan stack
dtolnay Jan 19, 2022
6e8b060
Simplify the buffer push done by scan_break
dtolnay Jan 19, 2022
cc66a7f
Eliminate eof token state
dtolnay Jan 19, 2022
4d3faae
Eliminate left and right cursors in favor of ring buffer
dtolnay Jan 19, 2022
48f5dca
Move back templates into html folder
GuillaumeGomez Jan 17, 2022
4bd571c
remove `is_noop`
lcnr Jan 19, 2022
c8e6889
Add assert that fallback targets must be available.
ehuss Jan 19, 2022
715cda2
Rollup merge of #92316 - petrochenkov:extmangle, r=wesleywiser
matthiaskrgr Jan 19, 2022
dfbb6b2
Rollup merge of #92630 - steffahn:lift_bounds_on_BuildHasherDefault, …
matthiaskrgr Jan 19, 2022
bcb093e
Rollup merge of #92800 - ehuss:docs-fallback, r=Mark-Simulacrum
matthiaskrgr Jan 19, 2022
623791d
Rollup merge of #93005 - GuillaumeGomez:templates-in-html, r=notriddle
matthiaskrgr Jan 19, 2022
fe93f08
Rollup merge of #93065 - dtolnay:ringbuffer, r=lcnr
matthiaskrgr Jan 19, 2022
43d508b
Rollup merge of #93077 - lcnr:write_substs, r=oli-obk
matthiaskrgr Jan 19, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions compiler/rustc_symbol_mangling/src/v0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -772,9 +772,9 @@ impl<'tcx> Printer<'tcx> for &mut SymbolMangler<'tcx> {
disambiguated_data: &DisambiguatedDefPathData,
) -> Result<Self::Path, Self::Error> {
let ns = match disambiguated_data.data {
// FIXME: It shouldn't be necessary to add anything for extern block segments,
// but we add 't' for backward compatibility.
DefPathData::ForeignMod => 't',
// Extern block segments can be skipped, names from extern blocks
// are effectively living in their parent modules.
DefPathData::ForeignMod => return print_prefix(self),

// Uppercase categories are more stable than lowercase ones.
DefPathData::TypeNs(_) => 't',
Expand Down
19 changes: 19 additions & 0 deletions src/test/ui/symbol-names/foreign-types.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// build-fail
// compile-flags: -C symbol-mangling-version=v0

#![feature(extern_types)]
#![feature(rustc_attrs)]

extern "C" {
type ForeignType;
}

struct Check<T: ?Sized>(T);

#[rustc_symbol_name]
//~^ ERROR symbol-name(_RMCs
//~| ERROR demangling(<foreign_types[
//~| ERROR demangling-alt(<foreign_types::Check<foreign_types::ForeignType>>)
impl Check<ForeignType> {}

fn main() {}
20 changes: 20 additions & 0 deletions src/test/ui/symbol-names/foreign-types.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
error: symbol-name(_RMCsCRATE_HASH_13foreign_typesINtB<REF>_5CheckNvB<REF>_11ForeignTypeE)
--> $DIR/foreign-types.rs:13:1
|
LL | #[rustc_symbol_name]
| ^^^^^^^^^^^^^^^^^^^^

error: demangling(<foreign_types[HASH]::Check<foreign_types[HASH]::ForeignType>>)
--> $DIR/foreign-types.rs:13:1
|
LL | #[rustc_symbol_name]
| ^^^^^^^^^^^^^^^^^^^^

error: demangling-alt(<foreign_types::Check<foreign_types::ForeignType>>)
--> $DIR/foreign-types.rs:13:1
|
LL | #[rustc_symbol_name]
| ^^^^^^^^^^^^^^^^^^^^

error: aborting due to 3 previous errors

32 changes: 16 additions & 16 deletions src/tools/rust-demangler/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ cc[4d6468d6c9fd4bb3]::spawn::{closure#0}::{closure#0}
<core[846817f741e54dfd]::slice::Iter<u8> as core[846817f741e54dfd]::iter::iterator::Iterator>::rposition::<core[846817f741e54dfd]::slice::memchr::memrchr::{closure#1}>::{closure#0}
alloc[f15a878b47eb696b]::alloc::box_free::<dyn alloc[f15a878b47eb696b]::boxed::FnBox<(), Output = ()>>
INtC8arrayvec8ArrayVechKj7b_E
<const_generic[317d481089b8c8fe]::Unsigned<11: u8>>
<const_generic[317d481089b8c8fe]::Signed<152: i16>>
<const_generic[317d481089b8c8fe]::Signed<-11: i8>>
<const_generic[317d481089b8c8fe]::Bool<false: bool>>
<const_generic[317d481089b8c8fe]::Bool<true: bool>>
<const_generic[317d481089b8c8fe]::Char<'v': char>>
<const_generic[317d481089b8c8fe]::Char<'\n': char>>
<const_generic[317d481089b8c8fe]::Char<'∂': char>>
<const_generic[317d481089b8c8fe]::Unsigned<11u8>>
<const_generic[317d481089b8c8fe]::Signed<152i16>>
<const_generic[317d481089b8c8fe]::Signed<-11i8>>
<const_generic[317d481089b8c8fe]::Bool<false>>
<const_generic[317d481089b8c8fe]::Bool<true>>
<const_generic[317d481089b8c8fe]::Char<'v'>>
<const_generic[317d481089b8c8fe]::Char<'\n'>>
<const_generic[317d481089b8c8fe]::Char<'∂'>>
<const_generic[317d481089b8c8fe]::Foo<_>>::foo::FOO
foo[0]
foo[0]
Expand All @@ -51,14 +51,14 @@ cc::spawn::{closure#0}::{closure#0}
<core::slice::Iter<u8> as core::iter::iterator::Iterator>::rposition::<core::slice::memchr::memrchr::{closure#1}>::{closure#0}
alloc::alloc::box_free::<dyn alloc::boxed::FnBox<(), Output = ()>>
INtC8arrayvec8ArrayVechKj7b_E
<const_generic::Unsigned<11: u8>>
<const_generic::Signed<152: i16>>
<const_generic::Signed<-11: i8>>
<const_generic::Bool<false: bool>>
<const_generic::Bool<true: bool>>
<const_generic::Char<'v': char>>
<const_generic::Char<'\n': char>>
<const_generic::Char<'∂': char>>
<const_generic::Unsigned<11u8>>
<const_generic::Signed<152i16>>
<const_generic::Signed<-11i8>>
<const_generic::Bool<false>>
<const_generic::Bool<true>>
<const_generic::Char<'v'>>
<const_generic::Char<'\n'>>
<const_generic::Char<'∂'>>
<const_generic::Foo<_>>::foo::FOO
foo[0]
foo[0]
Expand Down
0