Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 20 pull requests #40643

Closed
wants to merge 74 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
c7db40f
Rename expected_types_for_fn_args to expected_inputs_for_expected_out…
eddyb Mar 9, 2017
50aee36
Propagate expected type hints through struct literals.
eddyb Mar 9, 2017
6ba494b
Point to let when modifying field of immutable variable
estebank Mar 11, 2017
38b5b29
Change label to "consider changing this to `mut f`"
estebank Mar 12, 2017
197e529
Initial attempt at implementing optimization fuel and re-enabling str…
ahicks92 Mar 8, 2017
8f36057
Make a comment better.
ahicks92 Mar 9, 2017
c2d14fc
Tests for -Z fuel=foo=n
ahicks92 Mar 10, 2017
3fb94b7
UI test for -Z print-fuel=foo
ahicks92 Mar 10, 2017
9ac628d
Add label to primary span for mutable access of immutable struct error
estebank Mar 13, 2017
460bf55
Cleanup.
jseyfried Mar 6, 2017
68c1cc6
Refactor `Attribute` to use `Path` and `TokenStream` instead of `Meta…
jseyfried Mar 3, 2017
839c286
Liberalize attributes.
jseyfried Mar 8, 2017
85e02bd
Add tests.
jseyfried Mar 8, 2017
b43c744
Add feature toggle for rvalue-static-promotion RFC
tbg Mar 11, 2017
20c0f32
Use `&&` instead of `&`
tbg Mar 12, 2017
f06b049
Improve the documentation for `rvalue_static_promotion`
tbg Mar 12, 2017
ff63866
Change how the `0` flag works in format!
Sawyer47 Mar 3, 2017
8065486
Change how the 0 flag works in format! for floats
Sawyer47 Mar 4, 2017
2561dcd
Rename TryFrom's associated type and implement str::parse using TryFrom.
jimmycuadra Mar 5, 2017
c11ab21
save-analysis: only index path references once
nrc Mar 8, 2017
310f5bd
save-analysis: index extern blocks
nrc Mar 8, 2017
4cf22cb
rebased
nrc Mar 15, 2017
befeb04
Remove unused param from bootstrap::clean::rm_rf
mbrubeck Mar 15, 2017
9b89274
Fix const not displayed in rustdoc
GuillaumeGomez Mar 16, 2017
449219a
isolate llvm 4.0 code path
TimNN Mar 16, 2017
222ca3c
clang-format
TimNN Mar 16, 2017
95bd7f2
add missing global metadata
TimNN Mar 16, 2017
50cede0
documented order of conversion between u32 an ipv4addr
Mar 17, 2017
963d4df
minor wording tweak to slice::{as_ptr, as_mut_ptr}
QuietMisdreavus Mar 17, 2017
ec8ecf4
Fix typo in mutex.rs docs
ScottAbbey Mar 17, 2017
33a5665
Stabilize move_cell feature, closes #39264
aturon Mar 15, 2017
65b7c4e
Stabilize expect_err feature, closes #39041
aturon Mar 15, 2017
d38ea8b
Stabilize ptr_unaligned feature, closes #37955
aturon Mar 15, 2017
9511fe6
Stabilize process_abort feature, closes #37838
aturon Mar 15, 2017
10510ae
Stabilize ptr_eq feature, closes #36497
aturon Mar 15, 2017
37b38a2
Stabilize btree_range, closes #27787
aturon Mar 15, 2017
48890d4
Stabilize ordering_chaining, closes #37053
aturon Mar 15, 2017
a8f4a1b
Stabilize rc_raw feature, closes #37197
aturon Mar 15, 2017
1241a88
Minor fixups to fix tidy errors
alexcrichton Mar 15, 2017
27fcdb8
Specialize Vec::from_elem<u8> to use calloc or memset
mbrubeck Mar 10, 2017
ae630ca
Specialize Vec::from_elem for other integer types
mbrubeck Mar 10, 2017
e4af5fd
Remove internal liblog
alexcrichton Feb 15, 2017
cb96ade
Fix regression when `include!()`ing a `macro_rules!` containing a `$c…
jseyfried Mar 16, 2017
2976ddb
Fix a spelling error in HashMap documentation, and slightly reword it…
jswalden Mar 18, 2017
0af3775
translate tuple-variant constructors using MIR
arielb1 Feb 7, 2017
ffee956
move Instance to rustc and use it in the collector
arielb1 Feb 8, 2017
bf80fec
translate function shims using MIR
arielb1 Mar 6, 2017
aac5ba5
resolve instances to ty::Instance directly
arielb1 Mar 7, 2017
65a4266
refactor away callee::Callee and translate virtual calls through a MI…
arielb1 Mar 8, 2017
a5e3c3d
collector: collect functions when they are called/reified
arielb1 Mar 8, 2017
e1f3c67
translate closure shims using MIR
arielb1 Mar 8, 2017
2b9fea1
move the drop expansion code to rustc_mir
arielb1 Mar 9, 2017
26df816
apply pre-trans passes to Shim MIR
arielb1 Mar 9, 2017
f2c7917
translate drop glue using MIR
arielb1 Mar 13, 2017
1bd4c94
Rollup merge of #39628 - arielb1:shimmir, r=eddyb
frewsxcv Mar 18, 2017
9c955e8
Rollup merge of #40241 - Sawyer47:fix-39997, r=alexcrichton
frewsxcv Mar 18, 2017
8295bbe
Rollup merge of #40281 - jimmycuadra:try-from-from-str, r=aturon
frewsxcv Mar 18, 2017
650c090
Rollup merge of #40346 - jseyfried:path_and_tokenstream_attr, r=nrc
frewsxcv Mar 18, 2017
805ce93
Rollup merge of #40347 - alexcrichton:rm-liblog, r=alexcrichton
frewsxcv Mar 18, 2017
8bc39f8
Rollup merge of #40348 - nrc:save-extern-fn, r=@eddyb
frewsxcv Mar 18, 2017
b235f5a
Rollup merge of #40377 - camlorn:optimization_fuel, r=arielb1
frewsxcv Mar 18, 2017
b03edc8
Rollup merge of #40398 - eddyb:struct-hint, r=nikomatsakis
frewsxcv Mar 18, 2017
b2969fe
Rollup merge of #40409 - mbrubeck:calloc, r=sfackler
frewsxcv Mar 18, 2017
4735cf6
Rollup merge of #40441 - tschottdorf:promotable-rfc, r=eddyb
frewsxcv Mar 18, 2017
bcafe56
Rollup merge of #40445 - estebank:issue-18150, r=jonathandturner
frewsxcv Mar 18, 2017
8ed11ff
Rollup merge of #40538 - aturon:stab-1.17, r=alexcrichton
frewsxcv Mar 18, 2017
b4098c9
Rollup merge of #40562 - mbrubeck:bootstrap, r=alexcrichton
frewsxcv Mar 18, 2017
4b987ab
Rollup merge of #40564 - GuillaumeGomez:rustdoc-const, r=frewsxcv
frewsxcv Mar 18, 2017
c991ce4
Rollup merge of #40581 - TimNN:di-global-40, r=alexcrichton
frewsxcv Mar 18, 2017
f014ce8
Rollup merge of #40583 - jseyfried:fix_include_macro_regression, r=nrc
frewsxcv Mar 18, 2017
05c4a0d
Rollup merge of #40590 - z1mvader:master, r=steveklabnik
frewsxcv Mar 18, 2017
42c55c9
Rollup merge of #40603 - QuietMisdreavus:slice-ptr-docs, r=GuillaumeG…
frewsxcv Mar 18, 2017
6a5ecf1
Rollup merge of #40611 - ScottAbbey:patch-1, r=GuillaumeGomez
frewsxcv Mar 18, 2017
6b92bd6
Rollup merge of #40621 - jswalden:dependant-spelling-fix, r=sfackler
frewsxcv Mar 18, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 21 additions & 32 deletions src/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/bootstrap/bin/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ fn main() {
cmd.arg("-Cprefer-dynamic");
}

if env::var_os("RUSTC_PASS_RUSTBUILD_FLAG").is_some() {
cmd.arg("--cfg").arg("rustbuild");
}

// Help the libc crate compile by assisting it in finding the MUSL
// native libraries.
if let Some(s) = env::var_os("MUSL_ROOT") {
Expand Down
12 changes: 6 additions & 6 deletions src/bootstrap/clean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ use std::path::Path;
use Build;

pub fn clean(build: &Build) {
rm_rf(build, "tmp".as_ref());
rm_rf(build, &build.out.join("tmp"));
rm_rf(build, &build.out.join("dist"));
rm_rf("tmp".as_ref());
rm_rf(&build.out.join("tmp"));
rm_rf(&build.out.join("dist"));

for host in build.config.host.iter() {
let entries = match build.out.join(host).read_dir() {
Expand All @@ -38,12 +38,12 @@ pub fn clean(build: &Build) {
continue
}
let path = t!(entry.path().canonicalize());
rm_rf(build, &path);
rm_rf(&path);
}
}
}

fn rm_rf(build: &Build, path: &Path) {
fn rm_rf(path: &Path) {
if !path.exists() {
return
}
Expand All @@ -55,7 +55,7 @@ fn rm_rf(build: &Build, path: &Path) {
let file = t!(file).path();

if file.is_dir() {
rm_rf(build, &file);
rm_rf(&file);
} else {
// On windows we can't remove a readonly file, and git will
// often clone files as readonly. As a result, we have some
Expand Down
13 changes: 13 additions & 0 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,19 @@ impl Build {
.env("RUSTC_SNAPSHOT_LIBDIR", self.rustc_libdir(compiler));
}

// Most of the time we want to pass `--cfg rustbuild` which will flag
// upstream crates.io crates to compile themselves as unstable as we're
// going to put them in the sysroot. If we're compiling tools, however,
// we don't want to do that as the upstream crates.io deps may be in the
// crate graph and we don't want to compile them with their unstable
// versions.
match mode {
Mode::Tool => {}
_ => {
cargo.env("RUSTC_PASS_RUSTBUILD_FLAG", "1");
}
}

// Ignore incremental modes except for stage0, since we're
// not guaranteeing correctness acros builds if the compiler
// is changing under your feet.`
Expand Down
1 change: 1 addition & 0 deletions src/doc/unstable-book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
- [repr_simd](repr-simd.md)
- [rustc_attrs](rustc-attrs.md)
- [rustc_diagnostic_macros](rustc-diagnostic-macros.md)
- [rvalue_static_promotion](rvalue-static-promotion.md)
- [sanitizer_runtime](sanitizer-runtime.md)
- [simd](simd.md)
- [simd_ffi](simd-ffi.md)
Expand Down
5 changes: 5 additions & 0 deletions src/doc/unstable-book/src/allocator.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ pub extern fn __rust_allocate(size: usize, _align: usize) -> *mut u8 {
unsafe { libc::malloc(size as libc::size_t) as *mut u8 }
}

#[no_mangle]
pub extern fn __rust_allocate_zeroed(size: usize, _align: usize) -> *mut u8 {
unsafe { libc::calloc(size as libc::size_t, 1) as *mut u8 }
}

#[no_mangle]
pub extern fn __rust_deallocate(ptr: *mut u8, _old_size: usize, _align: usize) {
unsafe { libc::free(ptr as *mut libc::c_void) }
Expand Down
23 changes: 23 additions & 0 deletions src/doc/unstable-book/src/rvalue-static-promotion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# `rvalue_static_promotion`

The tracking issue for this feature is: [#38865]

[#38865]: https://github.com/rust-lang/rust/issues/38865

------------------------

The `rvalue_static_promotion` feature allows directly creating `'static` references to
constant `rvalue`s, which in particular allowing for more concise code in the common case
in which a `'static` reference is all that's needed.


## Examples

```rust
#![feature(rvalue_static_promotion)]

fn main() {
let DEFAULT_VALUE: &'static u32 = &42;
assert_eq!(*DEFAULT_VALUE, 42);
}
```
Loading