It's equivalent to `Ident::from_str_and_span`. The commit also
introduces some more static symbols so that `Ident::new` can be used in
various places instead of `Ident::from_str_and_span`.
The commit also changes `Path::path` from a `&str` to a `Symbol`, which
then allows the lifetime annotation to be removed from `Ty`. Also, the
use of `Symbol` in `Bounds` removes the need for its lifetime
annotation.
This commit refactors the initial implementation to fit into std and
makes some other changes:
- use MaybeUninit internally in SyncOnceCell
- correctly impl Drop for lazy::Once
- port Lazy::take from once_cell from: https://github.com/matklad/once_cell/pull/100
Co-Authored-By: Paul Dicker <pitdicker@users.noreply.github.com>
Rollup of 21 pull requests
Successful merges:
- #73566 (Don't run `everybody_loops` for rustdoc; instead ignore resolution errors)
- #73771 (Don't pollute docs/suggestions with libstd deps)
- #73794 (Small cleanup for E0705 explanation)
- #73807 (rustdoc: glue tokens before highlighting)
- #73835 (Clean up E0710 explanation)
- #73926 (Ignoring test case: [codegen] repr-transparent-aggregates-1.rs for aarch64)
- #73981 (Remove some `ignore-stage1` annotations.)
- #73998 (add regression test for #61216)
- #74140 (Make hir ProjectionKind more precise)
- #74148 (Move #[doc(alias)] check in rustc)
- #74159 (forbid generic params in the type of const params)
- #74171 (Fix 44056 test with debug on macos.)
- #74221 (Don't panic if the lhs of a div by zero is not statically known)
- #74325 (Focus on the current file in the source file sidebar)
- #74359 (rustdoc: Rename internal API fns to `into_string`)
- #74370 (Reintroduce spotlight / "important traits" feature)
- #74390 (Fix typo in std::mem::transmute documentation)
- #74391 (BtreeMap: superficially refactor root access)
- #74392 (const generics triage)
- #74397 (Fix typo in the latest release note)
- #74406 (Set shell for github actions CI)
Failed merges:
r? @ghost
const generics triage
I went through all const generics issues and closed all issues which are already fixed.
Some issues already have a regression test but were not closed. Also doing this as part of this PR.
uff r? @eddyb @varkor
closes#61936closes#62878closes#63695closes#67144closes#68596closes#69816closes#70217closes#70507closes#70586closes#71348closes#71805closes#73120closes#73508closes#73730closes#74255
Fix typo in std::mem::transmute documentation
`u32::from_ge_bytes` function does not exist; replace with `u32::from_be_bytes`.
It is clear that `u32::from_le_bytes` is not meant from the context; the latter is used correctly while `from_be_bytes` is misspelled.
Fix 44056 test with debug on macos.
The test `codegen/issue-44056-macos-tls-align.rs` fails on macos if `debug-assertions` is enabled in `config.toml`. It has the following error:
```
/Users/eric/Proj/rust/rust/src/test/codegen/issue-44056-macos-tls-align.rs:9:11: error: CHECK: expected string not found in input
// CHECK: @STATIC_VAR_1 = thread_local local_unnamed_addr global <{ [32 x i8] }> zeroinitializer, section "__DATA,__thread_bss", align 4
^
/Users/eric/Proj/rust/rust/build/x86_64-apple-darwin/test/codegen/issue-44056-macos-tls-align/issue-44056-macos-tls-align.ll:1:1: note: scanning from here
; ModuleID = 'issue_44056_macos_tls_align.3a1fbbbh-cgu.0'
^
/Users/eric/Proj/rust/rust/build/x86_64-apple-darwin/test/codegen/issue-44056-macos-tls-align/issue-44056-macos-tls-align.ll:9:1: note: possible intended match here
@STATIC_VAR_1 = thread_local global <{ [32 x i8] }> zeroinitializer, section "__DATA,__thread_bss", align 4
^
```
Comparing the output, the actual output is missing the text "`local_unnamed_addr`".
The fix here is to ignore `local_unnamed_addr`, as it doesn't seem relevant to the test.
Remove some `ignore-stage1` annotations.
These tests appear to no longer need the `ignore-stage1` marker.
- `run-make-fulldeps/issue-37839` and `run-make-fulldeps/issue-37893`: I believe these were due to the use of proc-macros, and probably were just missed in #49219 which fixed the proc-macro compatibility.
- `compile-fail/asm-src-loc-codegen-units.rs`: This was due to an old issue with landing pads (as mentioned in the linked issue #20184). `-Zno-landing-pads` was an option when building the first stage (it was much faster), but somewhere along the way (I think the switch from makefiles to rustbuild), the option was removed.
- NOTE: This test doesn't actually test what it was originally written for, and is probably mostly pointless now. This test was asserting the message "build without -C codegen-units for more exact errors", but that was removed in #42682. It is now in essence identical to `asm-src-loc.rs`.
Ignoring test case: [codegen] repr-transparent-aggregates-1.rs for aarch64
Ignoring test case: [codegen] repr-transparent-aggregates-1.rs for aarch64.
Copyright (c) 2020, Arm Limited.
rustdoc: glue tokens before highlighting
Fixes#72684.
This commit also modifies the signature of `Classifier::new` to avoid
copying the source being highlighted.