Skip to content

Commit f80e454

Browse files
committed
Auto merge of #97372 - JohnTitor:rollup-6owv1v0, r=JohnTitor
Rollup of 6 pull requests Successful merges: - #93966 (document expectations for Waker::wake) - #97266 (Make weird name lints trigger behind cfg_attr) - #97355 (Remove unused brush image) - #97358 (Update minifier-rs version to 0.1.0) - #97363 (Fix a small mistake in `SliceIndex`'s documentation) - #97364 (Fix weird indentation in continue_keyword docs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 76761db + c3fea09 commit f80e454

File tree

14 files changed

+236
-68
lines changed

14 files changed

+236
-68
lines changed

Cargo.lock

+2-11
Original file line numberDiff line numberDiff line change
@@ -2224,12 +2224,6 @@ version = "0.1.1"
22242224
source = "registry+https://github.com/rust-lang/crates.io-index"
22252225
checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
22262226

2227-
[[package]]
2228-
name = "macro-utils"
2229-
version = "0.1.3"
2230-
source = "registry+https://github.com/rust-lang/crates.io-index"
2231-
checksum = "0e72f7deb758fea9ea7d290aebfa788763d0bffae12caa6406a25baaf8fa68a8"
2232-
22332227
[[package]]
22342228
name = "maplit"
22352229
version = "1.0.2"
@@ -2361,12 +2355,9 @@ dependencies = [
23612355

23622356
[[package]]
23632357
name = "minifier"
2364-
version = "0.0.43"
2358+
version = "0.1.0"
23652359
source = "registry+https://github.com/rust-lang/crates.io-index"
2366-
checksum = "d81352bda6f4d04af1720afaa762054f66e16caffd93c1f86461a1c0ac4e695e"
2367-
dependencies = [
2368-
"macro-utils",
2369-
]
2360+
checksum = "7071d17e2898e134cabf624f43cdefa0cedf57c739e964df3d0df9d028701a72"
23702361

23712362
[[package]]
23722363
name = "minimal-lexical"

compiler/rustc_lint/src/early.rs

+17-17
Original file line numberDiff line numberDiff line change
@@ -424,10 +424,25 @@ pub fn check_ast_node<'a>(
424424
let mut passes: Vec<_> = passes.iter().map(|p| (p)()).collect();
425425
let mut buffered = lint_buffer.unwrap_or_default();
426426

427-
if !sess.opts.debugging_opts.no_interleave_lints {
427+
if sess.opts.debugging_opts.no_interleave_lints {
428+
for (i, pass) in passes.iter_mut().enumerate() {
429+
buffered =
430+
sess.prof.extra_verbose_generic_activity("run_lint", pass.name()).run(|| {
431+
early_lint_node(
432+
sess,
433+
!pre_expansion && i == 0,
434+
lint_store,
435+
registered_tools,
436+
buffered,
437+
EarlyLintPassObjects { lints: slice::from_mut(pass) },
438+
check_node,
439+
)
440+
});
441+
}
442+
} else {
428443
buffered = early_lint_node(
429444
sess,
430-
pre_expansion,
445+
!pre_expansion,
431446
lint_store,
432447
registered_tools,
433448
buffered,
@@ -446,21 +461,6 @@ pub fn check_ast_node<'a>(
446461
check_node,
447462
);
448463
}
449-
} else {
450-
for (i, pass) in passes.iter_mut().enumerate() {
451-
buffered =
452-
sess.prof.extra_verbose_generic_activity("run_lint", pass.name()).run(|| {
453-
early_lint_node(
454-
sess,
455-
pre_expansion && i == 0,
456-
lint_store,
457-
registered_tools,
458-
buffered,
459-
EarlyLintPassObjects { lints: slice::from_mut(pass) },
460-
check_node,
461-
)
462-
});
463-
}
464464
}
465465

466466
// All of the buffered lints should have been emitted at this point.

compiler/rustc_lint_defs/src/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ declare_lint! {
474474
}
475475

476476
declare_lint! {
477-
/// The `unknown_lints` lint detects unrecognized lint attribute.
477+
/// The `unknown_lints` lint detects unrecognized lint attributes.
478478
///
479479
/// ### Example
480480
///

library/core/src/slice/index.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ mod private_slice_index {
138138
/// A helper trait used for indexing operations.
139139
///
140140
/// Implementations of this trait have to promise that if the argument
141-
/// to `get_(mut_)unchecked` is a safe reference, then so is the result.
141+
/// to `get_unchecked(_mut)` is a safe reference, then so is the result.
142142
#[stable(feature = "slice_get_slice", since = "1.28.0")]
143143
#[rustc_diagnostic_item = "SliceIndex"]
144144
#[rustc_on_unimplemented(

library/core/src/task/wake.rs

+13
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,19 @@ unsafe impl Sync for Waker {}
218218

219219
impl Waker {
220220
/// Wake up the task associated with this `Waker`.
221+
///
222+
/// As long as the runtime keeps running and the task is not finished, it is
223+
/// guaranteed that each invocation of `wake` (or `wake_by_ref`) will be followed
224+
/// by at least one `poll` of the task to which this `Waker` belongs. This makes
225+
/// it possible to temporarily yield to other tasks while running potentially
226+
/// unbounded processing loops.
227+
///
228+
/// Note that the above implies that multiple wake-ups may be coalesced into a
229+
/// single `poll` invocation by the runtime.
230+
///
231+
/// Also note that yielding to competing tasks is not guaranteed: it is the
232+
/// executor’s choice which task to run and the executor may choose to run the
233+
/// current task again.
221234
#[inline]
222235
#[stable(feature = "futures_api", since = "1.36.0")]
223236
pub fn wake(self) {

library/std/src/keyword_docs.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ mod as_keyword {}
7070
/// A break expression is normally associated with the innermost loop enclosing the
7171
/// `break` but a label can be used to specify which enclosing loop is affected.
7272
///
73-
///```rust
73+
/// ```rust
7474
/// 'outer: for i in 1..=5 {
7575
/// println!("outer iteration (i): {i}");
7676
///
@@ -87,7 +87,7 @@ mod as_keyword {}
8787
/// }
8888
/// }
8989
/// println!("Bye.");
90-
///```
90+
/// ```
9191
///
9292
/// When associated with `loop`, a break expression may be used to return a value from that loop.
9393
/// This is only valid with `loop` and not with any other type of loop.
@@ -194,20 +194,20 @@ mod const_keyword {}
194194
/// When `continue` is encountered, the current iteration is terminated, returning control to the
195195
/// loop head, typically continuing with the next iteration.
196196
///
197-
///```rust
197+
/// ```rust
198198
/// // Printing odd numbers by skipping even ones
199199
/// for number in 1..=10 {
200200
/// if number % 2 == 0 {
201201
/// continue;
202202
/// }
203203
/// println!("{number}");
204204
/// }
205-
///```
205+
/// ```
206206
///
207207
/// Like `break`, `continue` is normally associated with the innermost enclosing loop, but labels
208208
/// may be used to specify the affected loop.
209209
///
210-
///```rust
210+
/// ```rust
211211
/// // Print Odd numbers under 30 with unit <= 5
212212
/// 'tens: for ten in 0..3 {
213213
/// '_units: for unit in 0..=9 {
@@ -220,7 +220,7 @@ mod const_keyword {}
220220
/// println!("{}", ten * 10 + unit);
221221
/// }
222222
/// }
223-
///```
223+
/// ```
224224
///
225225
/// See [continue expressions] from the reference for more details.
226226
///

src/librustdoc/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ arrayvec = { version = "0.7", default-features = false }
1111
askama = { version = "0.11", default-features = false, features = ["config"] }
1212
atty = "0.2"
1313
pulldown-cmark = { version = "0.9", default-features = false }
14-
minifier = "0.0.43"
14+
minifier = "0.1.0"
1515
serde = { version = "1.0", features = ["derive"] }
1616
serde_json = "1.0"
1717
smallvec = "1.6.1"

src/librustdoc/html/static/images/brush.svg

-1
This file was deleted.

src/test/ui-fulldeps/lint-tool-test.stderr

+8-8
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@ warning: lint name `test_group` is deprecated and may not have an effect in the
1818
LL | #[allow(test_group)]
1919
| ^^^^^^^^^^ help: change it to: `clippy::test_group`
2020

21-
warning: unknown lint: `this_lint_does_not_exist`
22-
--> $DIR/lint-tool-test.rs:36:8
23-
|
24-
LL | #[deny(this_lint_does_not_exist)]
25-
| ^^^^^^^^^^^^^^^^^^^^^^^^
26-
|
27-
= note: `#[warn(unknown_lints)]` on by default
28-
2921
warning: lint name `test_lint` is deprecated and may not have an effect in the future.
3022
--> $DIR/lint-tool-test.rs:9:23
3123
|
@@ -44,6 +36,14 @@ warning: lint name `test_group` is deprecated and may not have an effect in the
4436
LL | #[allow(test_group)]
4537
| ^^^^^^^^^^ help: change it to: `clippy::test_group`
4638

39+
warning: unknown lint: `this_lint_does_not_exist`
40+
--> $DIR/lint-tool-test.rs:36:8
41+
|
42+
LL | #[deny(this_lint_does_not_exist)]
43+
| ^^^^^^^^^^^^^^^^^^^^^^^^
44+
|
45+
= note: `#[warn(unknown_lints)]` on by default
46+
4747
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
4848
--> $DIR/lint-tool-test.rs:6:1
4949
|

src/test/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
warning: `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
2+
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:401:17
3+
|
4+
LL | mod inner { #![macro_escape] }
5+
| ^^^^^^^^^^^^^^^^
6+
|
7+
= help: try an outer attribute: `#[macro_use]`
8+
9+
warning: `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
10+
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:398:1
11+
|
12+
LL | #[macro_escape]
13+
| ^^^^^^^^^^^^^^^
14+
115
warning: unknown lint: `x5400`
216
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:46:9
317
|
@@ -172,20 +186,6 @@ warning: unknown lint: `x5100`
172186
LL | #[deny(x5100)] impl S { }
173187
| ^^^^^
174188

175-
warning: `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
176-
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:401:17
177-
|
178-
LL | mod inner { #![macro_escape] }
179-
| ^^^^^^^^^^^^^^^^
180-
|
181-
= help: try an outer attribute: `#[macro_use]`
182-
183-
warning: `#[macro_escape]` is a deprecated synonym for `#[macro_use]`
184-
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:398:1
185-
|
186-
LL | #[macro_escape]
187-
| ^^^^^^^^^^^^^^^
188-
189189
warning: use of deprecated attribute `crate_id`: no longer used.
190190
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:85:1
191191
|
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
error: unknown lint: `nonex_lint_top_level`
2+
--> $DIR/issue-97094.rs:14:26
3+
|
4+
LL | #![cfg_attr(all(), allow(nonex_lint_top_level))]
5+
| ^^^^^^^^^^^^^^^^^^^^
6+
|
7+
note: the lint level is defined here
8+
--> $DIR/issue-97094.rs:10:9
9+
|
10+
LL | #![deny(warnings)]
11+
| ^^^^^^^^
12+
= note: `#[deny(unknown_lints)]` implied by `#[deny(warnings)]`
13+
14+
error: lint `bare_trait_object` has been renamed to `bare_trait_objects`
15+
--> $DIR/issue-97094.rs:16:26
16+
|
17+
LL | #![cfg_attr(all(), allow(bare_trait_object))]
18+
| ^^^^^^^^^^^^^^^^^ help: use the new name: `bare_trait_objects`
19+
|
20+
= note: `#[deny(renamed_and_removed_lints)]` implied by `#[deny(warnings)]`
21+
22+
error: unknown lint: `nonex_lint_mod`
23+
--> $DIR/issue-97094.rs:19:25
24+
|
25+
LL | #[cfg_attr(all(), allow(nonex_lint_mod))]
26+
| ^^^^^^^^^^^^^^
27+
28+
error: unknown lint: `nonex_lint_mod_inner`
29+
--> $DIR/issue-97094.rs:22:30
30+
|
31+
LL | #![cfg_attr(all(), allow(nonex_lint_mod_inner))]
32+
| ^^^^^^^^^^^^^^^^^^^^
33+
34+
error: unknown lint: `nonex_lint_fn`
35+
--> $DIR/issue-97094.rs:26:25
36+
|
37+
LL | #[cfg_attr(all(), allow(nonex_lint_fn))]
38+
| ^^^^^^^^^^^^^
39+
40+
error: unknown lint: `nonex_lint_in_macro`
41+
--> $DIR/issue-97094.rs:37:29
42+
|
43+
LL | #[cfg_attr(all(), allow(nonex_lint_in_macro))]
44+
| ^^^^^^^^^^^^^^^^^^^
45+
46+
error: unknown lint: `nonex_lint_fn`
47+
--> $DIR/issue-97094.rs:56:13
48+
|
49+
LL | #[allow(nonex_lint_fn)]
50+
| ^^^^^^^^^^^^^
51+
52+
error: aborting due to 7 previous errors
53+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
error: unknown lint: `nonex_lint_top_level`
2+
--> $DIR/issue-97094.rs:14:26
3+
|
4+
LL | #![cfg_attr(all(), allow(nonex_lint_top_level))]
5+
| ^^^^^^^^^^^^^^^^^^^^
6+
|
7+
note: the lint level is defined here
8+
--> $DIR/issue-97094.rs:10:9
9+
|
10+
LL | #![deny(warnings)]
11+
| ^^^^^^^^
12+
= note: `#[deny(unknown_lints)]` implied by `#[deny(warnings)]`
13+
14+
error: lint `bare_trait_object` has been renamed to `bare_trait_objects`
15+
--> $DIR/issue-97094.rs:16:26
16+
|
17+
LL | #![cfg_attr(all(), allow(bare_trait_object))]
18+
| ^^^^^^^^^^^^^^^^^ help: use the new name: `bare_trait_objects`
19+
|
20+
= note: `#[deny(renamed_and_removed_lints)]` implied by `#[deny(warnings)]`
21+
22+
error: unknown lint: `nonex_lint_mod`
23+
--> $DIR/issue-97094.rs:19:25
24+
|
25+
LL | #[cfg_attr(all(), allow(nonex_lint_mod))]
26+
| ^^^^^^^^^^^^^^
27+
28+
error: unknown lint: `nonex_lint_mod_inner`
29+
--> $DIR/issue-97094.rs:22:30
30+
|
31+
LL | #![cfg_attr(all(), allow(nonex_lint_mod_inner))]
32+
| ^^^^^^^^^^^^^^^^^^^^
33+
34+
error: unknown lint: `nonex_lint_fn`
35+
--> $DIR/issue-97094.rs:26:25
36+
|
37+
LL | #[cfg_attr(all(), allow(nonex_lint_fn))]
38+
| ^^^^^^^^^^^^^
39+
40+
error: unknown lint: `nonex_lint_in_macro`
41+
--> $DIR/issue-97094.rs:37:29
42+
|
43+
LL | #[cfg_attr(all(), allow(nonex_lint_in_macro))]
44+
| ^^^^^^^^^^^^^^^^^^^
45+
46+
error: unknown lint: `nonex_lint_fn`
47+
--> $DIR/issue-97094.rs:56:13
48+
|
49+
LL | #[allow(nonex_lint_fn)]
50+
| ^^^^^^^^^^^^^
51+
52+
error: aborting due to 7 previous errors
53+

0 commit comments

Comments
 (0)