forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#133189 - GuillaumeGomez:rollup-rhylr1f, r=Gui…
…llaumeGomez Rollup of 6 pull requests Successful merges: - rust-lang#132577 (Report the `unexpected_cfgs` lint in external macros) - rust-lang#132758 (Improve `{BTreeMap,HashMap}::get_key_value` docs.) - rust-lang#133180 ([rustdoc] Fix items with generics not having their jump to def link generated) - rust-lang#133181 (Update books) - rust-lang#133182 (const_panic: inline in bootstrap builds to avoid f16/f128 crashes) - rust-lang#133187 (Add reference annotations for diagnostic attributes) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
44 changed files
with
332 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule stdarch
updated
12 files
Submodule edition-guide
updated
4 files
+23 −2 | .github/workflows/main.yml | |
+1 −0 | src/SUMMARY.md | |
+47 −0 | src/rust-2021/raw-lifetimes.md | |
+6 −5 | src/rust-2021/reserved-syntax.md |
Submodule reference
updated
19 files
+39 −0 | src/attributes.md | |
+63 −3 | src/attributes/codegen.md | |
+22 −0 | src/attributes/debugger.md | |
+9 −1 | src/attributes/derive.md | |
+72 −4 | src/attributes/diagnostics.md | |
+14 −1 | src/attributes/limits.md | |
+25 −4 | src/attributes/testing.md | |
+14 −2 | src/attributes/type_system.md | |
+1 −1 | src/conditional-compilation.md | |
+78 −0 | src/expressions/operator-expr.md | |
+51 −15 | src/inline-assembly.md | |
+2 −2 | src/items/enumerations.md | |
+3 −4 | src/items/generics.md | |
+17 −0 | src/linkage.md | |
+1 −1 | src/macro-ambiguity.md | |
+0 −2 | src/tokens.md | |
+2 −1 | src/trait-bounds.md | |
+3 −2 | src/type-layout.md | |
+1 −1 | src/types/trait-object.md |
Submodule rustc-dev-guide
updated
10 files
+1 −0 | src/SUMMARY.md | |
+2 −0 | src/building/suggested.md | |
+2 −0 | src/diagnostics.md | |
+1 −1 | src/llvm-coverage-instrumentation.md | |
+71 −51 | src/parallel-rustc.md | |
+2 −3 | src/stability.md | |
+11 −0 | src/tests/compiletest.md | |
+12 −1 | src/tests/directives.md | |
+4 −0 | src/tests/intro.md | |
+40 −0 | src/tests/misc.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// This test ensures that paths with generics still get their link to their definition | ||
// correctly generated. | ||
|
||
//@ compile-flags: -Zunstable-options --generate-link-to-definition | ||
#![crate_name = "foo"] | ||
|
||
//@ has 'src/foo/link-on-path-with-generics.rs.html' | ||
|
||
pub struct Soyo<T>(T); | ||
pub struct Saya; | ||
|
||
//@ has - '//pre[@class="rust"]//a[@href="#9"]' 'Soyo' | ||
//@ has - '//pre[@class="rust"]//a[@href="#10"]' 'Saya' | ||
pub fn bar<T>(s: Soyo<T>, x: Saya) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Inspired by https://github.com/rust-lang/cargo/issues/14775 | ||
|
||
pub fn my_lib_func() {} | ||
|
||
#[macro_export] | ||
macro_rules! my_lib_macro { | ||
() => { | ||
#[cfg(my_lib_cfg)] | ||
$crate::my_lib_func() | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// This test checks that we emit the `unexpected_cfgs` lint even in code | ||
// coming from an external macro. | ||
|
||
//@ check-pass | ||
//@ no-auto-check-cfg | ||
//@ aux-crate: cfg_macro=cfg_macro.rs | ||
//@ compile-flags: --check-cfg=cfg() | ||
|
||
fn main() { | ||
cfg_macro::my_lib_macro!(); | ||
//~^ WARNING unexpected `cfg` condition name | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
warning: unexpected `cfg` condition name: `my_lib_cfg` | ||
--> $DIR/report-in-external-macros.rs:10:5 | ||
| | ||
LL | cfg_macro::my_lib_macro!(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, and `windows` | ||
= help: to expect this configuration use `--check-cfg=cfg(my_lib_cfg)` | ||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration | ||
= note: `#[warn(unexpected_cfgs)]` on by default | ||
= note: this warning originates in the macro `cfg_macro::my_lib_macro` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
warning: 1 warning emitted | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
tests/ui/diagnostic_namespace/deny_malformed_attribute.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
tests/ui/diagnostic_namespace/malformed_foreign_on_unimplemented.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.