Skip to content

Commit 8b6558a

Browse files
committed
Auto merge of #158184 - JonathanBrouwer:rollup-ABE3nZj, r=JonathanBrouwer
Rollup of 3 pull requests Successful merges: - #158137 (Only copy visible content in clipboard in source code pages) - #158141 ([AArch64] FEAT_SVE implies FEAT_FP16) - #158177 (rustc-dev-guide subtree update)
2 parents fffed27 + 53c6a7f commit 8b6558a

25 files changed

Lines changed: 555 additions & 231 deletions

compiler/rustc_target/src/target_features.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ static AARCH64_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
354354
// exist together: https://developer.arm.com/documentation/102340/0100/New-features-in-SVE2
355355
//
356356
// "For backwards compatibility, Neon and VFP are required in the latest architectures."
357-
("sve", Stable, &["neon"]),
357+
("sve", Stable, &["neon", "fp16"]),
358358
// FEAT_SVE_B16B16 (SVE or SME Z-targeting instructions)
359359
("sve-b16b16", Unstable(sym::aarch64_unstable_target_feature), &["bf16"]),
360360
// FEAT_SVE2

src/doc/rustc-dev-guide/ci/sembr/src/main.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,3 +315,10 @@ html comment closing
315315
";
316316
assert_eq!(expected, lengthen_lines(original, 50));
317317
}
318+
319+
#[test]
320+
#[ignore]
321+
fn should_pass() {
322+
let original = "if you see `input isn't interesting! verify interesting-ness test`.";
323+
assert_eq!(original, comply(original));
324+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
49b19d32b9f01a5aa606f3bf2e90e6e0aa462c03
1+
8c75e93c5c7671c29f3e8c096b7acf56822ed23a

src/doc/rustc-dev-guide/src/SUMMARY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
- [Cranelift codegen backend](./tests/codegen-backend-tests/cg_clif.md)
3636
- [GCC codegen backend](./tests/codegen-backend-tests/cg_gcc.md)
3737
- [Performance testing](./tests/perf.md)
38+
- [Pre-stabilization CI job for the next solver and polonius alpha](./tests/x86_64-gnu-next-trait-solver-polonius-ci-job.md)
3839
- [Misc info](./tests/misc.md)
3940
- [Debugging the compiler](./compiler-debugging.md)
4041
- [Using the tracing/logging instrumentation](./tracing.md)
@@ -129,6 +130,7 @@
129130
- [Lang Items](./lang-items.md)
130131
- [The HIR (High-level IR)](./hir.md)
131132
- [Lowering AST to HIR](./hir/lowering.md)
133+
- [Attribute Parsing](./hir/attribute-parsing.md)
132134
- [Debugging](./hir/debugging.md)
133135
- [Ambig/Unambig Types and Consts](./ambig-unambig-ty-and-consts.md)
134136
- [The THIR (Typed High-level IR)](./thir.md)

src/doc/rustc-dev-guide/src/attributes.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,46 +5,55 @@ Attributes come in two types: *inert* (or *built-in*) and *active* (*non-builtin
55
## Builtin/inert attributes
66

77
These attributes are defined in the compiler itself, in
8-
[`compiler/rustc_feature/src/builtin_attrs.rs`][builtin_attrs].
8+
[`compiler/rustc_feature/src/builtin_attrs.rs`][builtin_attrs] and in the [attribute parsers][attr_parsing].
99

1010
Examples include `#[allow]` and `#[macro_use]`.
1111

1212
[builtin_attrs]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_feature/builtin_attrs/index.html
13+
[attr_parsing]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_attr_parsing/index.html
1314

1415
These attributes have several important characteristics:
1516
* They are always in scope, and do not participate in typical path-based resolution.
16-
* They cannot be renamed. For example, `use allow as foo` will compile, but writing `#[foo]` will
17-
produce an error.
17+
* They cannot be renamed.
18+
For example, `use allow as foo` will compile, but writing `#[foo]` will produce an error.
1819
* They are 'inert', meaning they are left as-is by the macro expansion code.
1920
As a result, any behavior comes as a result of the compiler explicitly checking for their presence.
2021
For example, lint-related code explicitly checks for `#[allow]`, `#[warn]`, `#[deny]`, and
2122
`#[forbid]`, rather than the behavior coming from the expansion of the attributes themselves.
2223

24+
For more information on these attributes, see the chapter about [attribute parsing][attr-parsing-chapter].
25+
26+
[attr-parsing-chapter]: ./hir/attribute-parsing.md
27+
2328
## 'Non-builtin'/'active' attributes
2429

2530
These attributes are defined by a crate - either the standard library, or a proc-macro crate.
2631

2732
**Important**: Many non-builtin attributes, such as `#[derive]`, are still considered part of the
28-
core Rust language. However, they are **not** called 'builtin attributes', since they have a
33+
core Rust language.
34+
However, they are **not** called 'builtin attributes', since they have a
2935
corresponding definition in the standard library.
3036

3137
Definitions of non-builtin attributes take two forms:
3238

3339
1. Proc-macro attributes, defined via a function annotated with `#[proc_macro_attribute]` in a
3440
proc-macro crate.
35-
2. AST-based attributes, defined in the standard library. These attributes have special 'stub'
41+
2. AST-based attributes, defined in the standard library.
42+
These attributes have special 'stub'
3643
macros defined in places like [`library/core/src/macros/mod.rs`][core_macros].
3744

3845
[core_macros]: https://github.com/rust-lang/rust/blob/HEAD/library/core/src/macros/mod.rs
3946

4047
These definitions exist to allow the macros to participate in typical path-based resolution - they
41-
can be imported, re-exported, and renamed just like any other item definition. However, the body of
42-
the definition is empty. Instead, the macro is annotated with the `#[rustc_builtin_macro]`
48+
can be imported, re-exported, and renamed just like any other item definition.
49+
However, the body of the definition is empty.
50+
Instead, the macro is annotated with the `#[rustc_builtin_macro]`
4351
attribute, which tells the compiler to run a corresponding function in `rustc_builtin_macros`.
4452

4553
All non-builtin attributes have the following characteristics:
4654
* Like all other definitions (e.g. structs), they must be brought into scope via an import.
4755
Many standard library attributes are included in the prelude - this is why writing `#[derive]`
4856
works without an import.
49-
* They participate in macro expansion. The implementation of the macro may leave the attribute
57+
* They participate in macro expansion.
58+
The implementation of the macro may leave the attribute
5059
target unchanged, modify the target, produce new AST nodes, or remove the target entirely.

0 commit comments

Comments
 (0)