Skip to content

Commit 570ae39

Browse files
committed
Merge branch 'master' of git://github.com/rust-lang/rust
2 parents e572d85 + 204c0a4 commit 570ae39

File tree

98 files changed

+1379
-1171
lines changed

Some content is hidden

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

98 files changed

+1379
-1171
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,6 @@
3333
[submodule "src/libcompiler_builtins"]
3434
path = src/libcompiler_builtins
3535
url = https://github.com/rust-lang-nursery/compiler-builtins
36+
[submodule "src/tools/clippy"]
37+
path = src/tools/clippy
38+
url = https://github.com/rust-lang-nursery/rust-clippy.git

CONTRIBUTING.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,32 @@ Speaking of tests, Rust has a comprehensive test suite. More information about
298298
it can be found
299299
[here](https://github.com/rust-lang/rust-wiki-backup/blob/master/Note-testsuite.md).
300300

301+
### External Dependencies
302+
303+
Currently building Rust will also build the following external projects:
304+
305+
* [clippy](https://github.com/rust-lang-nursery/rust-clippy)
306+
307+
If your changes break one of these projects, you need to fix them by opening
308+
a pull request against the broken project. When you have opened a pull request,
309+
you can point the submodule at your pull request by calling
310+
311+
```
312+
git fetch origin pull/$id_of_your_pr/head:my_pr
313+
git checkout my_pr
314+
```
315+
316+
within the submodule's directory. Don't forget to also add your changes with
317+
318+
```
319+
git add path/to/submodule
320+
```
321+
322+
outside the submodule.
323+
324+
It can also be more convenient during development to set `submodules = false`
325+
in the `config.toml` to prevent `x.py` from resetting to the original branch.
326+
301327
## Writing Documentation
302328

303329
Documentation improvements are very welcome. The source of `doc.rust-lang.org`

RELEASES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Version 1.20.0 (2017-08-31)
33

44
Language
55
--------
6-
- [Associated constants in traits is now stabilised.][42809]
6+
- [Associated constants are now stabilised.][42809]
77
- [A lot of macro bugs are now fixed.][42913]
88

99
Compiler
@@ -77,7 +77,7 @@ Stabilized APIs
7777
- [`slice::sort_unstable_by_key`]
7878
- [`slice::sort_unstable_by`]
7979
- [`slice::sort_unstable`]
80-
- [`ste::from_boxed_utf8_unchecked`]
80+
- [`str::from_boxed_utf8_unchecked`]
8181
- [`str::as_bytes_mut`]
8282
- [`str::as_bytes_mut`]
8383
- [`str::from_utf8_mut`]

src/Cargo.lock

Lines changed: 60 additions & 67 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,5 @@ debug-assertions = false
5656
debug = false
5757
debug-assertions = false
5858

59-
[replace]
60-
"https://github.com/rust-lang/cargo#0.22.0" = { path = "tools/cargo" }
59+
[patch.'https://github.com/rust-lang/cargo']
60+
cargo = { path = "tools/cargo" }

src/bootstrap/builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ impl<'a> Builder<'a> {
248248
compile::StartupObjects, tool::BuildManifest, tool::Rustbook, tool::ErrorIndex,
249249
tool::UnstableBookGen, tool::Tidy, tool::Linkchecker, tool::CargoTest,
250250
tool::Compiletest, tool::RemoteTestServer, tool::RemoteTestClient,
251-
tool::RustInstaller, tool::Cargo, tool::Rls, tool::Rustdoc,
251+
tool::RustInstaller, tool::Cargo, tool::Rls, tool::Rustdoc, tool::Clippy,
252252
native::Llvm),
253253
Kind::Test => describe!(check::Tidy, check::Bootstrap, check::DefaultCompiletest,
254254
check::HostCompiletest, check::Crate, check::CrateLibrustc, check::Linkcheck,

src/bootstrap/channel.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use Build;
2424
use config::Config;
2525

2626
// The version number
27-
pub const CFG_RELEASE_NUM: &str = "1.21.0";
27+
pub const CFG_RELEASE_NUM: &str = "1.22.0";
2828

2929
// An optional number to put after the label, e.g. '.2' -> '-beta.2'
3030
// Be sure to make this starts with a dot to conform to semver pre-release

src/bootstrap/dist.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ impl Step for Src {
757757
"src/libprofiler_builtins",
758758
];
759759
let std_src_dirs_exclude = [
760-
"src/compiler-rt/test",
760+
"src/libcompiler_builtins/compiler-rt/test",
761761
"src/jemalloc/test/unit",
762762
];
763763

src/bootstrap/native.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ impl Step for Openssl {
407407
"i686-unknown-freebsd" => "BSD-x86-elf",
408408
"i686-unknown-linux-gnu" => "linux-elf",
409409
"i686-unknown-linux-musl" => "linux-elf",
410+
"i686-unknown-netbsd" => "BSD-x86-elf",
410411
"mips-unknown-linux-gnu" => "linux-mips32",
411412
"mips64-unknown-linux-gnuabi64" => "linux64-mips64",
412413
"mips64el-unknown-linux-gnuabi64" => "linux64-mips64",

src/bootstrap/tool.rs

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,44 @@ impl Step for Cargo {
340340
}
341341
}
342342

343+
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
344+
pub struct Clippy {
345+
pub compiler: Compiler,
346+
pub target: Interned<String>,
347+
}
348+
349+
impl Step for Clippy {
350+
type Output = PathBuf;
351+
const DEFAULT: bool = false;
352+
const ONLY_HOSTS: bool = true;
353+
354+
fn should_run(run: ShouldRun) -> ShouldRun {
355+
run.path("src/tools/clippy")
356+
}
357+
358+
fn make_run(run: RunConfig) {
359+
run.builder.ensure(Clippy {
360+
compiler: run.builder.compiler(run.builder.top_stage, run.builder.build.build),
361+
target: run.target,
362+
});
363+
}
364+
365+
fn run(self, builder: &Builder) -> PathBuf {
366+
// Clippy depends on procedural macros (serde), which requires a full host
367+
// compiler to be available, so we need to depend on that.
368+
builder.ensure(compile::Rustc {
369+
compiler: self.compiler,
370+
target: builder.build.build,
371+
});
372+
builder.ensure(ToolBuild {
373+
compiler: self.compiler,
374+
target: self.target,
375+
tool: "clippy",
376+
mode: Mode::Librustc,
377+
})
378+
}
379+
}
380+
343381
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
344382
pub struct Rls {
345383
pub compiler: Compiler,

0 commit comments

Comments
 (0)