Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 755064b

Browse files
committed
Auto merge of rust-lang#76852 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
[beta] backports * Ignore rustc_private items from std docs rust-lang#76571 * Fix HashMap visualizers in Visual Studio (Code) rust-lang#76389 * Account for version number in NtIdent hack rust-lang#76331 * Account for async functions when suggesting new named lifetime rust-lang#75867 * Fix loading pretty-printers in rust-lldb script rust-lang#76015 This also bumps to the released stable compiler.
2 parents aa30bf3 + 557e2bc commit 755064b

File tree

18 files changed

+170
-37
lines changed

18 files changed

+170
-37
lines changed

src/bootstrap/dist.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,7 @@ impl Step for DebuggerScripts {
647647

648648
cp_debugger_script("lldb_lookup.py");
649649
cp_debugger_script("lldb_providers.py");
650+
cp_debugger_script("lldb_commands")
650651
}
651652
}
652653
}

src/etc/lldb_commands

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_lookup.py\"
21
type synthetic add -l lldb_lookup.synthetic_lookup -x \".*\" --category Rust
32
type summary add -F lldb_lookup.summary_lookup -e -x -h \"^(alloc::([a-z_]+::)+)String$\" --category Rust
43
type summary add -F lldb_lookup.summary_lookup -e -x -h \"^&str$\" --category Rust

src/etc/natvis/libstd.natvis

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<If Condition="(base.table.ctrl.pointer[i] &amp; 0x80) == 0">
4242
<!-- Bucket is populated -->
4343
<Exec>n--</Exec>
44-
<Item Name="{static_cast&lt;tuple&lt;$T1, $T2&gt;*&gt;(base.table.ctrl.pointer)[-(i + 1)].__0}">static_cast&lt;tuple&lt;$T1, $T2&gt;*&gt;(base.table.ctrl.pointer)[-(i + 1)].__1</Item>
44+
<Item Name="{((tuple&lt;$T1, $T2&gt;*)base.table.ctrl.pointer)[-(i + 1)].__0}">((tuple&lt;$T1, $T2&gt;*)base.table.ctrl.pointer)[-(i + 1)].__1</Item>
4545
</If>
4646
<Exec>i++</Exec>
4747
</Loop>
@@ -65,7 +65,7 @@
6565
<If Condition="(map.base.table.ctrl.pointer[i] &amp; 0x80) == 0">
6666
<!-- Bucket is populated -->
6767
<Exec>n--</Exec>
68-
<Item>static_cast&lt;$T1*&gt;(map.base.table.ctrl.pointer)[-(i + 1)]</Item>
68+
<Item>(($T1*)map.base.table.ctrl.pointer)[-(i + 1)]</Item>
6969
</If>
7070
<Exec>i++</Exec>
7171
</Loop>

src/etc/rust-lldb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,8 @@ EOF
3030
fi
3131
fi
3232

33+
script_import="command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_lookup.py\""
34+
commands_file="$RUSTC_SYSROOT/lib/rustlib/etc/lldb_commands"
35+
3336
# Call LLDB with the commands added to the argument list
34-
exec "$lldb" --source-before-file ./lldb_commands "$@"
37+
exec "$lldb" --one-line-before-file "$script_import" --source-before-file "$commands_file" "$@"

src/librustc_ast/token.rs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -821,9 +821,19 @@ impl Nonterminal {
821821
if let ExpnKind::Macro(_, macro_name) = orig_span.ctxt().outer_expn_data().kind {
822822
let filename = source_map.span_to_filename(orig_span);
823823
if let FileName::Real(RealFileName::Named(path)) = filename {
824-
if (path.ends_with("time-macros-impl/src/lib.rs")
825-
&& macro_name == sym::impl_macros)
826-
|| (path.ends_with("js-sys/src/lib.rs") && macro_name == sym::arrays)
824+
let matches_prefix = |prefix| {
825+
// Check for a path that ends with 'prefix*/src/lib.rs'
826+
let mut iter = path.components().rev();
827+
iter.next().and_then(|p| p.as_os_str().to_str()) == Some("lib.rs")
828+
&& iter.next().and_then(|p| p.as_os_str().to_str()) == Some("src")
829+
&& iter
830+
.next()
831+
.and_then(|p| p.as_os_str().to_str())
832+
.map_or(false, |p| p.starts_with(prefix))
833+
};
834+
835+
if (macro_name == sym::impl_macros && matches_prefix("time-macros-impl"))
836+
|| (macro_name == sym::arrays && matches_prefix("js-sys"))
827837
{
828838
let snippet = source_map.span_to_snippet(orig_span);
829839
if snippet.as_deref() == Ok("$name") {

src/librustc_resolve/late/diagnostics.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,6 +1222,9 @@ impl<'tcx> LifetimeContext<'_, 'tcx> {
12221222
synthetic: Some(hir::SyntheticTyParamKind::ImplTrait),
12231223
..
12241224
} => false,
1225+
hir::GenericParamKind::Lifetime {
1226+
kind: hir::LifetimeParamKind::Elided,
1227+
} => false,
12251228
_ => true,
12261229
}) {
12271230
(param.span.shrink_to_lo(), format!("{}, ", lifetime_ref))

src/librustdoc/clean/inline.rs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -337,18 +337,13 @@ pub fn build_impl(
337337
// reachable in rustdoc generated documentation
338338
if !did.is_local() {
339339
if let Some(traitref) = associated_trait {
340-
if !cx.renderinfo.borrow().access_levels.is_public(traitref.def_id) {
340+
let did = traitref.def_id;
341+
if !cx.renderinfo.borrow().access_levels.is_public(did) {
341342
return;
342343
}
343-
}
344344

345-
// Skip foreign unstable traits from lists of trait implementations and
346-
// such. This helps prevent dependencies of the standard library, for
347-
// example, from getting documented as "traits `u32` implements" which
348-
// isn't really too helpful.
349-
if let Some(trait_did) = associated_trait {
350-
if let Some(stab) = cx.tcx.lookup_stability(trait_did.def_id) {
351-
if stab.level.is_unstable() {
345+
if let Some(stab) = tcx.lookup_stability(did) {
346+
if stab.level.is_unstable() && stab.feature == sym::rustc_private {
352347
return;
353348
}
354349
}
@@ -372,6 +367,12 @@ pub fn build_impl(
372367
if !cx.renderinfo.borrow().access_levels.is_public(did) {
373368
return;
374369
}
370+
371+
if let Some(stab) = tcx.lookup_stability(did) {
372+
if stab.level.is_unstable() && stab.feature == sym::rustc_private {
373+
return;
374+
}
375+
}
375376
}
376377
}
377378

src/stage0.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# source tarball for a stable release you'll likely see `1.x.0` for rustc and
1313
# `0.(x+1).0` for Cargo where they were released on `date`.
1414

15-
date: 2020-08-24
15+
date: 2020-08-27
1616
rustc: 1.46.0
1717
cargo: 0.47.0
1818

@@ -40,4 +40,4 @@ cargo: 0.47.0
4040
# looking at a beta source tarball and it's uncommented we'll shortly comment it
4141
# out.
4242

43-
dev: 1
43+
#dev: 1
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// aux-build:realcore.rs
2+
3+
#![crate_name = "real_gimli"]
4+
#![feature(staged_api, extremely_unstable)]
5+
#![unstable(feature = "rustc_private", issue = "none")]
6+
7+
extern crate realcore;
8+
9+
#[unstable(feature = "rustc_private", issue = "none")]
10+
pub struct EndianSlice;
11+
12+
#[unstable(feature = "rustc_private", issue = "none")]
13+
impl realcore::Deref for EndianSlice {}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#![crate_name = "realcore"]
2+
#![feature(staged_api)]
3+
#![unstable(feature = "extremely_unstable", issue = "none")]
4+
5+
#[unstable(feature = "extremely_unstable_foo", issue = "none")]
6+
pub struct Foo {}
7+
8+
#[unstable(feature = "extremely_unstable_foo", issue = "none")]
9+
pub trait Join {}
10+
11+
#[unstable(feature = "extremely_unstable_foo", issue = "none")]
12+
impl Join for Foo {}
13+
14+
#[stable(feature = "faked_deref", since = "1.47.0")]
15+
pub trait Deref {}

0 commit comments

Comments
 (0)