Skip to content

Commit 1d9485e

Browse files
adpaco-awstedinski
authored andcommitted
Remove unneeded rustdoc content and add copyright for the rest (rust-lang#1038)
* Remove some assets * Remove `rust-doc` files and submodules * Remove static files and references to them * Remove `highlight` tests and fixtures * Remove templates and code that used them with warnings (now hidden) * Add copyright modifications for TOML files * Add copyright modifications to Rust files * Remove asset formats not present anymore from exclude list * Keep original scope for non-used attributes * Remove html tests from `mod.rs` * Fix format issues
1 parent 783a848 commit 1d9485e

File tree

220 files changed

+330
-17440
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

220 files changed

+330
-17440
lines changed

.gitmodules

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,9 @@
44
[submodule "src/doc/reference"]
55
path = tools/bookrunner/rust-doc/reference
66
url = https://github.com/rust-lang/reference.git
7-
[submodule "src/doc/book"]
8-
path = tools/bookrunner/rust-doc/book
9-
url = https://github.com/rust-lang/book.git
107
[submodule "src/doc/rust-by-example"]
118
path = tools/bookrunner/rust-doc/rust-by-example
129
url = https://github.com/rust-lang/rust-by-example.git
13-
[submodule "src/doc/rustc-dev-guide"]
14-
path = tools/bookrunner/rust-doc/rustc-dev-guide
15-
url = https://github.com/rust-lang/rustc-dev-guide.git
16-
[submodule "src/doc/edition-guide"]
17-
path = tools/bookrunner/rust-doc/edition-guide
18-
url = https://github.com/rust-lang/edition-guide.git
19-
[submodule "src/doc/embedded-book"]
20-
path = tools/bookrunner/rust-doc/embedded-book
21-
url = https://github.com/rust-embedded/book.git
2210
[submodule "firecracker"]
2311
path = firecracker
2412
url = https://github.com/firecracker-microvm/firecracker.git

scripts/ci/copyright-exclude

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,5 @@ gitmodules
1111
LICENSE-APACHE
1212
LICENSE-MIT
1313
Cargo.lock
14-
.svg
1514
.png
16-
.woff
17-
scripts/ci/copyright-exclude
18-
tools/bookrunner/librustdoc
19-
tools/bookrunner/rust-doc
15+
scripts/ci/copyright-exclude

tools/bookrunner/librustdoc/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-License-Identifier: Apache-2.0 OR MIT
2+
#
3+
# Modifications Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
# See GitHub history for details.
15
[package]
26
name = "rustdoc"
37
version = "0.0.0"

tools/bookrunner/librustdoc/clean/auto_trait.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Modifications Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
// See GitHub history for details.
15
use rustc_data_structures::fx::FxHashSet;
26
use rustc_hir as hir;
37
use rustc_hir::lang_items::LangItem;

tools/bookrunner/librustdoc/clean/blanket_impl.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Modifications Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
// See GitHub history for details.
15
use crate::rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt;
26
use rustc_infer::infer::{InferOk, TyCtxtInferExt};
37
use rustc_infer::traits;

tools/bookrunner/librustdoc/clean/cfg.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Modifications Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
// See GitHub history for details.
15
//! The representation of a `#[doc(cfg(...))]` attribute.
26
37
// FIXME: Once the portability lint RFC is implemented (see tracking issue #41619),

tools/bookrunner/librustdoc/clean/cfg/tests.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Modifications Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
// See GitHub history for details.
15
use super::*;
26

37
use rustc_ast::attr;

tools/bookrunner/librustdoc/clean/inline.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Modifications Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
// See GitHub history for details.
15
//! Support for inlining external documentation into the current AST.
26
37
use std::iter::once;

tools/bookrunner/librustdoc/clean/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Modifications Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
// See GitHub history for details.
15
//! This module contains the "cleaned" pieces of the AST, and the functions
26
//! that clean them.
37
mod auto_trait;

tools/bookrunner/librustdoc/clean/simplify.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Modifications Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
// See GitHub history for details.
15
//! Simplification of where-clauses and parameter bounds into a prettier and
26
//! more canonical form.
37
//!

tools/bookrunner/librustdoc/clean/types.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Modifications Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
// See GitHub history for details.
15
use std::cell::RefCell;
26
use std::default::Default;
37
use std::hash::Hash;

tools/bookrunner/librustdoc/clean/utils.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Modifications Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
// See GitHub history for details.
15
use crate::clean::auto_trait::AutoTraitFinder;
26
use crate::clean::blanket_impl::BlanketImplFinder;
37
use crate::clean::{

tools/bookrunner/librustdoc/clean/utils/tests.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Modifications Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
// See GitHub history for details.
15
use super::*;
26

37
#[test]

tools/bookrunner/librustdoc/config.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Modifications Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
// See GitHub history for details.
15
use std::convert::TryFrom;
26
use std::fmt;
37
use std::path::PathBuf;

tools/bookrunner/librustdoc/core.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Modifications Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
// See GitHub history for details.
15
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
26
use rustc_hir::def::Res;
37
use rustc_hir::def_id::DefId;

tools/bookrunner/librustdoc/docfs.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Modifications Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
// See GitHub history for details.
15
//! Rustdoc's FileSystem abstraction module.
26
//!
37
//! On Windows this indirects IO into threads to work around performance issues

tools/bookrunner/librustdoc/doctest.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Modifications Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
// See GitHub history for details.
15
use rustc_ast as ast;
26
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
37
use rustc_data_structures::sync::Lrc;

tools/bookrunner/librustdoc/doctest/tests.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Modifications Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
// See GitHub history for details.
15
use super::{make_test, GlobalTestOptions};
26
use rustc_span::edition::DEFAULT_EDITION;
37

tools/bookrunner/librustdoc/error.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Modifications Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
// See GitHub history for details.
15
use std::error;
26
use std::fmt::{self, Formatter};
37
use std::path::{Path, PathBuf};

tools/bookrunner/librustdoc/externalfiles.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Modifications Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
// See GitHub history for details.
15
use serde::Serialize;
26

37
#[derive(Clone, Debug, Serialize)]

tools/bookrunner/librustdoc/fold.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Modifications Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
// See GitHub history for details.
15
use crate::clean::*;
26

37
crate fn strip_item(mut item: Item) -> Item {

tools/bookrunner/librustdoc/formats/cache.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Modifications Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
// See GitHub history for details.
15
use std::mem;
26

37
use rustc_data_structures::fx::{FxHashMap, FxHashSet};

tools/bookrunner/librustdoc/formats/item_type.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Modifications Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
// See GitHub history for details.
15
//! Item types.
26
37
use std::fmt;

tools/bookrunner/librustdoc/formats/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Modifications Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
// See GitHub history for details.
15
crate mod cache;
26
crate mod item_type;
37
crate mod renderer;

tools/bookrunner/librustdoc/formats/renderer.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Modifications Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
// See GitHub history for details.
15
use rustc_middle::ty::TyCtxt;
26

37
use crate::clean;

tools/bookrunner/librustdoc/html/escape.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Modifications Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
// See GitHub history for details.
15
//! HTML escaping.
26
//!
37
//! This module contains one unit struct, which can be used to HTML-escape a

tools/bookrunner/librustdoc/html/format.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Modifications Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
// See GitHub history for details.
15
//! HTML formatting module
26
//!
37
//! This module contains a large number of `fmt::Display` implementations for

tools/bookrunner/librustdoc/html/highlight.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Modifications Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
// See GitHub history for details.
15
//! Basic syntax highlighting functionality.
26
//!
37
//! This module uses librustc_ast's lexer to provide token-based highlighting for
@@ -754,6 +758,3 @@ fn string<T: Display>(
754758
}
755759
write!(out, "<span class=\"{}\">{}</span>", klass.as_html(), text_s);
756760
}
757-
758-
#[cfg(test)]
759-
mod tests;

tools/bookrunner/librustdoc/html/highlight/fixtures/decorations.html

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

tools/bookrunner/librustdoc/html/highlight/fixtures/dos_line.html

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

tools/bookrunner/librustdoc/html/highlight/fixtures/highlight.html

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

tools/bookrunner/librustdoc/html/highlight/fixtures/sample.html

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

tools/bookrunner/librustdoc/html/highlight/fixtures/sample.rs

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

tools/bookrunner/librustdoc/html/highlight/fixtures/union.html

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

tools/bookrunner/librustdoc/html/highlight/fixtures/union.rs

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

0 commit comments

Comments
 (0)