Skip to content

Commit e280515

Browse files
author
Jorge Aparicio
committed
hack: add a linker_flavor feature gate
to make tidy accept `-Z linker-flavor` documentation
1 parent 2a177b7 commit e280515

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

src/doc/unstable-book/src/SUMMARY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
- [link_llvm_intrinsics](link-llvm-intrinsics.md)
107107
- [linkage](linkage.md)
108108
- [linked_list_extras](linked-list-extras.md)
109-
- [linker-flavor](linker-flavor.md)
109+
- [linker_flavor](linker-flavor.md)
110110
- [log_syntax](log-syntax.md)
111111
- [lookup_host](lookup-host.md)
112112
- [loop_break_value](loop-break-value.md)

src/libsyntax/feature_gate.rs

+3
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,9 @@ declare_features! (
343343

344344
// Used to preserve symbols (see llvm.used)
345345
(active, used, "1.18.0", Some(40289)),
346+
347+
// Hack to document `-Z linker-flavor` in The Unstable Book
348+
(active, linker_flavor, "1.18.0", Some(41142)),
346349
);
347350

348351
declare_features! (
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
#![linker_flavor] //~ ERROR the `#[linker_flavor]` attribute is
12+
13+
fn main() {}

0 commit comments

Comments
 (0)