Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 23d200e

Browse files
committedMay 1, 2024
Stabilize custom_code_classes_in_docs feature
1 parent 378a43a commit 23d200e

23 files changed

+54
-450
lines changed
 

‎compiler/rustc_feature/src/accepted.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ declare_features! (
138138
(accepted, copy_closures, "1.26.0", Some(44490)),
139139
/// Allows `crate` in paths.
140140
(accepted, crate_in_paths, "1.30.0", Some(45477)),
141+
/// Allows users to provide classes for fenced code block using `class:classname`.
142+
(accepted, custom_code_classes_in_docs, "CURRENT_RUSTC_VERSION", Some(79483)),
141143
/// Allows using `#[debugger_visualizer]` attribute.
142144
(accepted, debugger_visualizer, "1.71.0", Some(95939)),
143145
/// Allows rustc to inject a default alloc_error_handler

‎compiler/rustc_feature/src/unstable.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,6 @@ declare_features! (
424424
/// Allows function attribute `#[coverage(on/off)]`, to control coverage
425425
/// instrumentation of that function.
426426
(unstable, coverage_attribute, "1.74.0", Some(84605)),
427-
/// Allows users to provide classes for fenced code block using `class:classname`.
428-
(unstable, custom_code_classes_in_docs, "1.74.0", Some(79483)),
429427
/// Allows non-builtin attributes in inner attribute position.
430428
(unstable, custom_inner_attributes, "1.30.0", Some(54726)),
431429
/// Allows custom test frameworks with `#![test_runner]` and `#[test_case]`.

‎src/doc/rustdoc/src/unstable-features.md

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -624,47 +624,3 @@ add the `--scrape-tests` flag.
624624

625625
This flag enables the generation of links in the source code pages which allow the reader
626626
to jump to a type definition.
627-
628-
### Custom CSS classes for code blocks
629-
630-
```rust
631-
#![feature(custom_code_classes_in_docs)]
632-
633-
/// ```custom,{class=language-c}
634-
/// int main(void) { return 0; }
635-
/// ```
636-
pub struct Bar;
637-
```
638-
639-
The text `int main(void) { return 0; }` is rendered without highlighting in a code block
640-
with the class `language-c`. This can be used to highlight other languages through JavaScript
641-
libraries for example.
642-
643-
Without the `custom` attribute, it would be generated as a Rust code example with an additional
644-
`language-C` CSS class. Therefore, if you specifically don't want it to be a Rust code example,
645-
don't forget to add the `custom` attribute.
646-
647-
To be noted that you can replace `class=` with `.` to achieve the same result:
648-
649-
```rust
650-
#![feature(custom_code_classes_in_docs)]
651-
652-
/// ```custom,{.language-c}
653-
/// int main(void) { return 0; }
654-
/// ```
655-
pub struct Bar;
656-
```
657-
658-
To be noted, `rust` and `.rust`/`class=rust` have different effects: `rust` indicates that this is
659-
a Rust code block whereas the two others add a "rust" CSS class on the code block.
660-
661-
You can also use double quotes:
662-
663-
```rust
664-
#![feature(custom_code_classes_in_docs)]
665-
666-
/// ```"not rust" {."hello everyone"}
667-
/// int main(void) { return 0; }
668-
/// ```
669-
pub struct Bar;
670-
```

‎src/doc/rustdoc/src/write-documentation/documentation-tests.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,44 @@ that the code sample should be compiled using the respective edition of Rust.
376376
# fn foo() {}
377377
```
378378

379+
### Custom CSS classes for code blocks
380+
381+
```rust
382+
/// ```custom,{class=language-c}
383+
/// int main(void) { return 0; }
384+
/// ```
385+
pub struct Bar;
386+
```
387+
388+
The text `int main(void) { return 0; }` is rendered without highlighting in a code block
389+
with the class `language-c`. This can be used to highlight other languages through JavaScript
390+
libraries for example.
391+
392+
Without the `custom` attribute, it would be generated as a Rust code example with an additional
393+
`language-C` CSS class. Therefore, if you specifically don't want it to be a Rust code example,
394+
don't forget to add the `custom` attribute.
395+
396+
To be noted that you can replace `class=` with `.` to achieve the same result:
397+
398+
```rust
399+
/// ```custom,{.language-c}
400+
/// int main(void) { return 0; }
401+
/// ```
402+
pub struct Bar;
403+
```
404+
405+
To be noted, `rust` and `.rust`/`class=rust` have different effects: `rust` indicates that this is
406+
a Rust code block whereas the two others add a "rust" CSS class on the code block.
407+
408+
You can also use double quotes:
409+
410+
```rust
411+
/// ```"not rust" {."hello everyone"}
412+
/// int main(void) { return 0; }
413+
/// ```
414+
pub struct Bar;
415+
```
416+
379417
## Syntax reference
380418

381419
The *exact* syntax for code blocks, including the edge cases, can be found

‎src/librustdoc/doctest.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1345,7 +1345,6 @@ impl<'a, 'hir, 'tcx> HirCollector<'a, 'hir, 'tcx> {
13451345
def_id.to_def_id(),
13461346
span_of_fragments(&attrs.doc_strings).unwrap_or(sp),
13471347
)),
1348-
self.tcx.features().custom_code_classes_in_docs,
13491348
);
13501349
}
13511350

‎src/librustdoc/externalfiles.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ impl ExternalHtml {
4646
edition,
4747
playground,
4848
heading_offset: HeadingOffset::H2,
49-
// For external files, it'll be disabled until the feature is enabled by default.
50-
custom_code_classes_in_docs: false,
5149
}
5250
.into_string()
5351
);
@@ -63,8 +61,6 @@ impl ExternalHtml {
6361
edition,
6462
playground,
6563
heading_offset: HeadingOffset::H2,
66-
// For external files, it'll be disabled until the feature is enabled by default.
67-
custom_code_classes_in_docs: false,
6864
}
6965
.into_string()
7066
);

‎src/librustdoc/html/markdown.rs

Lines changed: 10 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
//! edition: Edition::Edition2015,
2121
//! playground: &None,
2222
//! heading_offset: HeadingOffset::H2,
23-
//! custom_code_classes_in_docs: true,
2423
//! };
2524
//! let html = md.into_string();
2625
//! // ... something using html
@@ -97,8 +96,6 @@ pub struct Markdown<'a> {
9796
/// Offset at which we render headings.
9897
/// E.g. if `heading_offset: HeadingOffset::H2`, then `# something` renders an `<h2>`.
9998
pub heading_offset: HeadingOffset,
100-
/// `true` if the `custom_code_classes_in_docs` feature is enabled.
101-
pub custom_code_classes_in_docs: bool,
10299
}
103100
/// A struct like `Markdown` that renders the markdown with a table of contents.
104101
pub(crate) struct MarkdownWithToc<'a> {
@@ -107,8 +104,6 @@ pub(crate) struct MarkdownWithToc<'a> {
107104
pub(crate) error_codes: ErrorCodes,
108105
pub(crate) edition: Edition,
109106
pub(crate) playground: &'a Option<Playground>,
110-
/// `true` if the `custom_code_classes_in_docs` feature is enabled.
111-
pub(crate) custom_code_classes_in_docs: bool,
112107
}
113108
/// A tuple struct like `Markdown` that renders the markdown escaping HTML tags
114109
/// and includes no paragraph tags.
@@ -209,7 +204,6 @@ struct CodeBlocks<'p, 'a, I: Iterator<Item = Event<'a>>> {
209204
// Information about the playground if a URL has been specified, containing an
210205
// optional crate name and the URL.
211206
playground: &'p Option<Playground>,
212-
custom_code_classes_in_docs: bool,
213207
}
214208

215209
impl<'p, 'a, I: Iterator<Item = Event<'a>>> CodeBlocks<'p, 'a, I> {
@@ -218,14 +212,12 @@ impl<'p, 'a, I: Iterator<Item = Event<'a>>> CodeBlocks<'p, 'a, I> {
218212
error_codes: ErrorCodes,
219213
edition: Edition,
220214
playground: &'p Option<Playground>,
221-
custom_code_classes_in_docs: bool,
222215
) -> Self {
223216
CodeBlocks {
224217
inner: iter,
225218
check_error_codes: error_codes,
226219
edition,
227220
playground,
228-
custom_code_classes_in_docs,
229221
}
230222
}
231223
}
@@ -257,7 +249,6 @@ impl<'a, I: Iterator<Item = Event<'a>>> Iterator for CodeBlocks<'_, 'a, I> {
257249
lang,
258250
self.check_error_codes,
259251
false,
260-
self.custom_code_classes_in_docs,
261252
);
262253
if !parse_result.rust {
263254
let added_classes = parse_result.added_classes;
@@ -733,7 +724,6 @@ pub(crate) fn find_testable_code<T: doctest::Tester>(
733724
error_codes: ErrorCodes,
734725
enable_per_target_ignores: bool,
735726
extra_info: Option<&ExtraInfo<'_>>,
736-
custom_code_classes_in_docs: bool,
737727
) {
738728
find_codes(
739729
doc,
@@ -742,7 +732,6 @@ pub(crate) fn find_testable_code<T: doctest::Tester>(
742732
enable_per_target_ignores,
743733
extra_info,
744734
false,
745-
custom_code_classes_in_docs,
746735
)
747736
}
748737

@@ -753,7 +742,6 @@ pub(crate) fn find_codes<T: doctest::Tester>(
753742
enable_per_target_ignores: bool,
754743
extra_info: Option<&ExtraInfo<'_>>,
755744
include_non_rust: bool,
756-
custom_code_classes_in_docs: bool,
757745
) {
758746
let mut parser = Parser::new(doc).into_offset_iter();
759747
let mut prev_offset = 0;
@@ -772,7 +760,6 @@ pub(crate) fn find_codes<T: doctest::Tester>(
772760
error_codes,
773761
enable_per_target_ignores,
774762
extra_info,
775-
custom_code_classes_in_docs,
776763
)
777764
}
778765
}
@@ -1167,29 +1154,6 @@ impl<'a, 'tcx> Iterator for TagIterator<'a, 'tcx> {
11671154
}
11681155
}
11691156

1170-
fn tokens(string: &str) -> impl Iterator<Item = LangStringToken<'_>> {
1171-
// Pandoc, which Rust once used for generating documentation,
1172-
// expects lang strings to be surrounded by `{}` and for each token
1173-
// to be proceeded by a `.`. Since some of these lang strings are still
1174-
// loose in the wild, we strip a pair of surrounding `{}` from the lang
1175-
// string and a leading `.` from each token.
1176-
1177-
let string = string.trim();
1178-
1179-
let first = string.chars().next();
1180-
let last = string.chars().last();
1181-
1182-
let string =
1183-
if first == Some('{') && last == Some('}') { &string[1..string.len() - 1] } else { string };
1184-
1185-
string
1186-
.split(|c| c == ',' || c == ' ' || c == '\t')
1187-
.map(str::trim)
1188-
.map(|token| token.strip_prefix('.').unwrap_or(token))
1189-
.filter(|token| !token.is_empty())
1190-
.map(|token| LangStringToken::LangToken(token))
1191-
}
1192-
11931157
impl Default for LangString {
11941158
fn default() -> Self {
11951159
Self {
@@ -1213,14 +1177,12 @@ impl LangString {
12131177
string: &str,
12141178
allow_error_code_check: ErrorCodes,
12151179
enable_per_target_ignores: bool,
1216-
custom_code_classes_in_docs: bool,
12171180
) -> Self {
12181181
Self::parse(
12191182
string,
12201183
allow_error_code_check,
12211184
enable_per_target_ignores,
12221185
None,
1223-
custom_code_classes_in_docs,
12241186
)
12251187
}
12261188

@@ -1229,7 +1191,6 @@ impl LangString {
12291191
allow_error_code_check: ErrorCodes,
12301192
enable_per_target_ignores: bool,
12311193
extra: Option<&ExtraInfo<'_>>,
1232-
custom_code_classes_in_docs: bool,
12331194
) -> Self {
12341195
let allow_error_code_check = allow_error_code_check.as_bool();
12351196
let mut seen_rust_tags = false;
@@ -1266,11 +1227,7 @@ impl LangString {
12661227
seen_rust_tags = true;
12671228
}
12681229
LangStringToken::LangToken("custom") => {
1269-
if custom_code_classes_in_docs {
1270-
seen_custom_tag = true;
1271-
} else {
1272-
seen_other_tags = true;
1273-
}
1230+
seen_custom_tag = true;
12741231
}
12751232
LangStringToken::LangToken("test_harness") => {
12761233
data.test_harness = true;
@@ -1361,16 +1318,12 @@ impl LangString {
13611318
data.unknown.push(x.to_owned());
13621319
}
13631320
LangStringToken::KeyValueAttribute(key, value) => {
1364-
if custom_code_classes_in_docs {
1365-
if key == "class" {
1366-
data.added_classes.push(value.to_owned());
1367-
} else if let Some(extra) = extra {
1368-
extra.error_invalid_codeblock_attr(format!(
1369-
"unsupported attribute `{key}`"
1370-
));
1371-
}
1372-
} else {
1373-
seen_other_tags = true;
1321+
if key == "class" {
1322+
data.added_classes.push(value.to_owned());
1323+
} else if let Some(extra) = extra {
1324+
extra.error_invalid_codeblock_attr(format!(
1325+
"unsupported attribute `{key}`"
1326+
));
13741327
}
13751328
}
13761329
LangStringToken::ClassAttribute(class) => {
@@ -1380,11 +1333,7 @@ impl LangString {
13801333
}
13811334
};
13821335

1383-
if custom_code_classes_in_docs {
1384-
call(&mut TagIterator::new(string, extra))
1385-
} else {
1386-
call(&mut tokens(string))
1387-
}
1336+
call(&mut TagIterator::new(string, extra));
13881337

13891338
// ignore-foo overrides ignore
13901339
if !ignores.is_empty() {
@@ -1407,7 +1356,6 @@ impl Markdown<'_> {
14071356
edition,
14081357
playground,
14091358
heading_offset,
1410-
custom_code_classes_in_docs,
14111359
} = self;
14121360

14131361
// This is actually common enough to special-case
@@ -1430,7 +1378,7 @@ impl Markdown<'_> {
14301378
let p = Footnotes::new(p);
14311379
let p = LinkReplacer::new(p.map(|(ev, _)| ev), links);
14321380
let p = TableWrapper::new(p);
1433-
let p = CodeBlocks::new(p, codes, edition, playground, custom_code_classes_in_docs);
1381+
let p = CodeBlocks::new(p, codes, edition, playground);
14341382
html::push_html(&mut s, p);
14351383

14361384
s
@@ -1445,7 +1393,6 @@ impl MarkdownWithToc<'_> {
14451393
error_codes: codes,
14461394
edition,
14471395
playground,
1448-
custom_code_classes_in_docs,
14491396
} = self;
14501397

14511398
let p = Parser::new_ext(md, main_body_opts()).into_offset_iter();
@@ -1458,7 +1405,7 @@ impl MarkdownWithToc<'_> {
14581405
let p = HeadingLinks::new(p, Some(&mut toc), ids, HeadingOffset::H1);
14591406
let p = Footnotes::new(p);
14601407
let p = TableWrapper::new(p.map(|(ev, _)| ev));
1461-
let p = CodeBlocks::new(p, codes, edition, playground, custom_code_classes_in_docs);
1408+
let p = CodeBlocks::new(p, codes, edition, playground);
14621409
html::push_html(&mut s, p);
14631410
}
14641411

@@ -1902,7 +1849,6 @@ pub(crate) struct RustCodeBlock {
19021849
pub(crate) fn rust_code_blocks(
19031850
md: &str,
19041851
extra_info: &ExtraInfo<'_>,
1905-
custom_code_classes_in_docs: bool,
19061852
) -> Vec<RustCodeBlock> {
19071853
let mut code_blocks = vec![];
19081854

@@ -1925,7 +1871,6 @@ pub(crate) fn rust_code_blocks(
19251871
ErrorCodes::Yes,
19261872
false,
19271873
Some(extra_info),
1928-
custom_code_classes_in_docs,
19291874
)
19301875
};
19311876
if !lang_string.rust {

‎src/librustdoc/html/markdown/tests.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@ fn test_header() {
305305
edition: DEFAULT_EDITION,
306306
playground: &None,
307307
heading_offset: HeadingOffset::H2,
308-
custom_code_classes_in_docs: true,
309308
}
310309
.into_string();
311310
assert_eq!(output, expect, "original: {}", input);
@@ -357,7 +356,6 @@ fn test_header_ids_multiple_blocks() {
357356
edition: DEFAULT_EDITION,
358357
playground: &None,
359358
heading_offset: HeadingOffset::H2,
360-
custom_code_classes_in_docs: true,
361359
}
362360
.into_string();
363361
assert_eq!(output, expect, "original: {}", input);
@@ -506,7 +504,6 @@ fn test_ascii_with_prepending_hashtag() {
506504
edition: DEFAULT_EDITION,
507505
playground: &None,
508506
heading_offset: HeadingOffset::H2,
509-
custom_code_classes_in_docs: true,
510507
}
511508
.into_string();
512509
assert_eq!(output, expect, "original: {}", input);

‎src/librustdoc/html/render/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,6 @@ fn scrape_examples_help(shared: &SharedContext<'_>) -> String {
504504
edition: shared.edition(),
505505
playground: &shared.playground,
506506
heading_offset: HeadingOffset::H1,
507-
custom_code_classes_in_docs: false,
508507
}
509508
.into_string()
510509
)
@@ -538,7 +537,6 @@ fn render_markdown<'a, 'cx: 'a>(
538537
heading_offset: HeadingOffset,
539538
) -> impl fmt::Display + 'a + Captures<'cx> {
540539
display_fn(move |f| {
541-
let custom_code_classes_in_docs = cx.tcx().features().custom_code_classes_in_docs;
542540
write!(
543541
f,
544542
"<div class=\"docblock\">{}</div>",
@@ -550,7 +548,6 @@ fn render_markdown<'a, 'cx: 'a>(
550548
edition: cx.shared.edition(),
551549
playground: &cx.shared.playground,
552550
heading_offset,
553-
custom_code_classes_in_docs,
554551
}
555552
.into_string()
556553
)
@@ -1868,7 +1865,6 @@ fn render_impl(
18681865
</div>",
18691866
);
18701867
}
1871-
let custom_code_classes_in_docs = cx.tcx().features().custom_code_classes_in_docs;
18721868
write!(
18731869
w,
18741870
"<div class=\"docblock\">{}</div>",
@@ -1880,7 +1876,6 @@ fn render_impl(
18801876
edition: cx.shared.edition(),
18811877
playground: &cx.shared.playground,
18821878
heading_offset: HeadingOffset::H4,
1883-
custom_code_classes_in_docs,
18841879
}
18851880
.into_string()
18861881
);

‎src/librustdoc/markdown.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ pub(crate) fn render<P: AsRef<Path>>(
8282
error_codes,
8383
edition,
8484
playground: &playground,
85-
// For markdown files, it'll be disabled until the feature is enabled by default.
86-
custom_code_classes_in_docs: false,
8785
}
8886
.into_string()
8987
} else {
@@ -95,8 +93,6 @@ pub(crate) fn render<P: AsRef<Path>>(
9593
edition,
9694
playground: &playground,
9795
heading_offset: HeadingOffset::H1,
98-
// For markdown files, it'll be disabled until the feature is enabled by default.
99-
custom_code_classes_in_docs: false,
10096
}
10197
.into_string()
10298
};
@@ -174,7 +170,6 @@ pub(crate) fn test(options: Options) -> Result<(), String> {
174170
codes,
175171
options.enable_per_target_ignores,
176172
None,
177-
false,
178173
);
179174

180175
crate::doctest::run_tests(options.test_args, options.nocapture, collector.tests);

‎src/librustdoc/passes/calculate_doc_coverage.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ impl<'a, 'b> DocVisitor for CoverageCalculator<'a, 'b> {
214214
ErrorCodes::No,
215215
false,
216216
None,
217-
self.ctx.tcx.features().custom_code_classes_in_docs,
218217
);
219218

220219
let has_doc_example = tests.found_tests != 0;

‎src/librustdoc/passes/check_custom_code_classes.rs

Lines changed: 0 additions & 93 deletions
This file was deleted.

‎src/librustdoc/passes/check_doc_test_visibility.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ pub(crate) fn look_for_tests<'tcx>(cx: &DocContext<'tcx>, dox: &str, item: &Item
118118
ErrorCodes::No,
119119
false,
120120
None,
121-
cx.tcx.features().custom_code_classes_in_docs,
122121
);
123122

124123
if tests.found_tests == 0 && cx.tcx.features().rustdoc_missing_doc_code_examples {

‎src/librustdoc/passes/lint/check_code_block_syntax.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ pub(crate) fn visit_item(cx: &DocContext<'_>, item: &clean::Item) {
2020
if let Some(dox) = &item.opt_doc_value() {
2121
let sp = item.attr_span(cx.tcx);
2222
let extra = crate::html::markdown::ExtraInfo::new(cx.tcx, item.item_id.expect_def_id(), sp);
23-
for code_block in
24-
markdown::rust_code_blocks(dox, &extra, cx.tcx.features().custom_code_classes_in_docs)
25-
{
23+
for code_block in markdown::rust_code_blocks(dox, &extra) {
2624
check_rust_syntax(cx, item, dox, code_block);
2725
}
2826
}

‎src/librustdoc/passes/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ pub(crate) use self::calculate_doc_coverage::CALCULATE_DOC_COVERAGE;
3535
mod lint;
3636
pub(crate) use self::lint::RUN_LINTS;
3737

38-
mod check_custom_code_classes;
39-
pub(crate) use self::check_custom_code_classes::CHECK_CUSTOM_CODE_CLASSES;
40-
4138
/// A single pass over the cleaned documentation.
4239
///
4340
/// Runs in the compiler context, so it has access to types and traits and the like.
@@ -69,7 +66,6 @@ pub(crate) enum Condition {
6966

7067
/// The full list of passes.
7168
pub(crate) const PASSES: &[Pass] = &[
72-
CHECK_CUSTOM_CODE_CLASSES,
7369
CHECK_DOC_TEST_VISIBILITY,
7470
STRIP_HIDDEN,
7571
STRIP_PRIVATE,
@@ -83,7 +79,6 @@ pub(crate) const PASSES: &[Pass] = &[
8379

8480
/// The list of passes run by default.
8581
pub(crate) const DEFAULT_PASSES: &[ConditionalPass] = &[
86-
ConditionalPass::always(CHECK_CUSTOM_CODE_CLASSES),
8782
ConditionalPass::always(COLLECT_TRAIT_IMPLS),
8883
ConditionalPass::always(CHECK_DOC_TEST_VISIBILITY),
8984
ConditionalPass::new(STRIP_HIDDEN, WhenNotDocumentHidden),

‎tests/rustdoc-ui/custom_code_classes_in_docs-warning.rs

Lines changed: 0 additions & 83 deletions
This file was deleted.

‎tests/rustdoc-ui/custom_code_classes_in_docs-warning.stderr

Lines changed: 0 additions & 97 deletions
This file was deleted.

‎tests/rustdoc-ui/custom_code_classes_in_docs-warning3.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// This test ensures that warnings are working as expected for "custom_code_classes_in_docs"
22
// feature.
33

4-
#![feature(custom_code_classes_in_docs)]
54
#![deny(warnings)]
65
#![feature(no_core)]
76
#![no_core]

‎tests/rustdoc-ui/custom_code_classes_in_docs-warning3.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: unclosed quote string `"`
2-
--> $DIR/custom_code_classes_in_docs-warning3.rs:9:1
2+
--> $DIR/custom_code_classes_in_docs-warning3.rs:8:1
33
|
44
LL | / /// ```{class="}
55
LL | | /// main;
@@ -11,14 +11,14 @@ LL | | /// ```
1111
| |_______^
1212
|
1313
note: the lint level is defined here
14-
--> $DIR/custom_code_classes_in_docs-warning3.rs:5:9
14+
--> $DIR/custom_code_classes_in_docs-warning3.rs:4:9
1515
|
1616
LL | #![deny(warnings)]
1717
| ^^^^^^^^
1818
= note: `#[deny(rustdoc::invalid_codeblock_attributes)]` implied by `#[deny(warnings)]`
1919

2020
error: unclosed quote string `"`
21-
--> $DIR/custom_code_classes_in_docs-warning3.rs:9:1
21+
--> $DIR/custom_code_classes_in_docs-warning3.rs:8:1
2222
|
2323
LL | / /// ```{class="}
2424
LL | | /// main;

‎tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.rs

Lines changed: 0 additions & 16 deletions
This file was deleted.

‎tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.stderr

Lines changed: 0 additions & 15 deletions
This file was deleted.

‎tests/rustdoc-ui/issues/issue-91713.stdout

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
Available passes for running rustdoc:
2-
check-custom-code-classes - check for custom code classes without the feature-gate enabled
32
check_doc_test_visibility - run various visibility-related lints on doctests
43
strip-hidden - strips all `#[doc(hidden)]` items from the output
54
strip-private - strips all private items from a crate which cannot be seen externally, implies strip-priv-imports
@@ -11,7 +10,6 @@ calculate-doc-coverage - counts the number of items with and without documentati
1110
run-lints - runs some of rustdoc's lints
1211

1312
Default passes for rustdoc:
14-
check-custom-code-classes
1513
collect-trait-impls
1614
check_doc_test_visibility
1715
strip-hidden (when not --document-hidden-items)

‎tests/rustdoc/custom_code_classes.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Test for `custom_code_classes_in_docs` feature.
22

3-
#![feature(custom_code_classes_in_docs)]
43
#![crate_name = "foo"]
54
#![feature(no_core)]
65
#![no_core]

0 commit comments

Comments
 (0)
Please sign in to comment.