- 29 9月, 2017 2 次提交
-
-
由 Daniel Klauer 提交于
To match the C signature, main() should be generated with C int type for the argc parameter and result, i.e. i32 instead of i64 on 64bit. That way it no longer relies on the upper 32 bits being zero, which I'm not sure is guaranteed by ABIs or startup code.
-
由 Daniel Klauer 提交于
Add c_int for use in the compiler, assuming i32 for all targets as in libc.
-
- 28 9月, 2017 5 次提交
-
-
由 bors 提交于
Add span label to E0384 for MIR borrowck Corresponds to `report_illegal_reassignment`. Part of #44596.
-
由 bors 提交于
TrustedRandomAccess specialisation for Iterator::cloned when Item: Copy. This should fix #44424. It also provides a potential fix for more iterators using `Iterator::cloned`.
-
由 bors 提交于
Add aarch64-unknown-linux-musl target This adds support for the aarch64-unknown-linux-musl target in the build and CI systems. This addresses half of issue #42520. The new file `aarch64_unknown_linux_musl.rs` is a copy of `aarch64_unknown_linux_gnu.rs` with "gnu" replaced by "musl", and the added logic in `build-arm-musl.sh` is similarly a near-copy of the arches around it, so overall the changes were straightforward. Testing: ``` $ sudo ./src/ci/docker/run.sh cross ... Dist std stage2 (x86_64-unknown-linux-gnu -> aarch64-unknown-linux-musl) Building stage2 test artifacts (x86_64-unknown-linux-gnu -> aarch64-unknown-linux-musl) Compiling getopts v0.2.14 Compiling term v0.0.0 (file:///checkout/src/libterm) Compiling test v0.0.0 (file:///checkout/src/libtest) Finished release [optimized] target(s) in 16.91 secs Copying stage2 test from stage2 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / aarch64-unknown-linux-musl) ... Build completed successfully in 0:55:22 ``` ``` $ rustup toolchain link local obj/build/x86_64-unknown-linux-gnu/stage2 $ rustup default local ``` After setting the local toolchain as default, and adding this in ~/.cargo/config: ``` [target.aarch64-unknown-linux-musl] linker = "aarch64-linux-musl-gcc" ``` ...then the toolchain was able to build a working ripgrep as a test: ``` $ readelf -a target/aarch64-unknown-linux-musl/debug/rg | grep -i interpreter $ readelf -a target/aarch64-unknown-linux-musl/debug/rg | grep NEEDED $ file target/aarch64-unknown-linux-musl/debug/rg target/aarch64-unknown-linux-musl/debug/rg: ELF 64-bit LSB executable, ARM aarch64, version 1 (GNU/Linux), statically linked, BuildID[sha1]=be11036b0988fac5dccc9f6487eb780b05186582, not stripped ```
-
由 bors 提交于
Point at parameter type on E0301 On "the parameter type `T` may not live long enough" error, point to the parameter type suggesting lifetime bindings: ``` error[E0310]: the parameter type `T` may not live long enough --> $DIR/lifetime-doesnt-live-long-enough.rs:28:5 | 27 | struct Foo<T> { | - help: consider adding an explicit lifetime bound `T: 'static`... 28 | foo: &'static T | ^^^^^^^^^^^^^^^ | note: ...so that the reference type `&'static T` does not outlive the data it points at --> $DIR/lifetime-doesnt-live-long-enough.rs:28:5 | 28 | foo: &'static T | ^^^^^^^^^^^^^^^ ``` Fix #36700.
-
由 bors 提交于
Initial support for `..=` syntax #28237 This PR adds `..=` as a synonym for `...` in patterns and expressions. Since `...` in expressions was never stable, we now issue a warning. cc @durka r? @aturon
-
- 27 9月, 2017 10 次提交
-
-
由 bors 提交于
don't let rustdoc get confused by text "fn main" in a line comment ~~~Resolves~~~ (edited) partially addresses #21299. ![rustdoc_fn_main](https://user-images.githubusercontent.com/1076988/30630993-9aeecc4a-9d97-11e7-8e56-2b973f23f683.png) r? @QuietMisdreavus
-
由 bors 提交于
Allow unused extern crate again This is a partial revert of #42588. There is a usability concern reported in #44294 that was not considered in the discussion of the PR, so I would like to back this out of 1.21. As is, I think users would have a worse and more confusing experience with this lint enabled by default. We can re-enabled once there are better diagnostics or the case in #44294 does not trigger the lint.
-
由 Keith Yeung 提交于
-
由 bors 提交于
Allow rustdoc to get compiled with debuginfo Fixes #44810 cc @QuietMisdreavus r? @alexcrichton
-
由 bors 提交于
Fix capacity comparison in reserve You can otherwise end up in a situation where you don't actually resize but still call into handle_cap_increase which then corrupts head/tail. Closes #44800 Not totally sure the right way to write a test for this - there are some debug asserts the old bad behavior will hit but we don't build the stdlib with debug assertions by default. r? @Gankro
-
由 Mark Simulacrum 提交于
-
由 Zack M. Davis 提交于
This is in the matter of #21299.
-
由 bors 提交于
macros: fix bug in collecting trait and impl items with derives. Fixes #43023. r? @nrc
-
由 Badel2 提交于
-
由 bors 提交于
use param_env on the trait_cache key We bailed from making trans_fulfill_obligation return `Option` or `Result`, just made it less prone to crashing outside trans r? @nikomatsakis
-
- 26 9月, 2017 6 次提交
-
-
由 bors 提交于
Some fixes to mir-borrowck Make the code more closely match the NLL RFC (updated description). (The biggest visible fix the addition of the Shallow/Deep distinction, which means mir-borrowck stops falsely thinking that StorageDeads need deep access to their input L-value.)
-
由 bors 提交于
Friendlier error message for closure argument type mismatch Rebased #42270. Fixes #42143. --- `test.rs`: ```rust fn main() { foo(|_: i32, _: usize| ()); } fn foo<F>(_: F) where F: Fn(&str, usize) {} ``` Before: ``` error[E0281]: type mismatch: `[closure@test.rs:2:9: 2:30]` implements the trait `std::ops::Fn<(i32, usize)>`, but the trait `for<'r> std::ops::Fn<(&'r str, usize)>` is required --> test.rs:2:5 | 2 | foo(|_: i32, _: usize| ()); | ^^^ --------------------- implements `std::ops::Fn<(i32, usize)>` | | | expected &str, found i32 | requires `for<'r> std::ops::Fn<(&'r str, usize)>` | = note: required by `foo` ``` After (early): ``` error[E0631]: type mismatch in closure arguments --> test.rs:2:5 | 2 | foo(|_: i32, _: usize| ()); | ^^^ --------------------- takes arguments of type `i32` and `usize` | | | expected arguments of type `&str` and `usize` | = note: required by `foo` ``` After (current): ``` error[E0631]: type mismatch in closure arguments --> test.rs:2:5 | 2 | foo(|_: i32, _: usize| ()); | ^^^ --------------------- found signature of `fn(i32, usize) -> _` | | | expected signature of `for<'r> fn(&'r str, usize) -> _` | = note: required by `foo` ``` ~~Compiler output has been changed, and a few tests are failing. Help me writing/fixing tests!~~ r? @nikomatsakis
-
由 Jeffrey Seyfried 提交于
-
由 bors 提交于
Add suggestions for misspelled method names Use the syntax::util::lev_distance module to provide suggestions when a named method cannot be found. Part of #30197
-
由 bors 提交于
Require rlibs for dependent crates when linking static executables This handles the case for `CrateTypeExecutable` and `+crt_static`. I reworked the match block to avoid duplicating the `attempt_static` and error checking code again (this case would have been a copy of the `CrateTypeCdylib`/`CrateTypeStaticlib` case). On `linux-musl` targets where `std` was built with `crt_static = false` in `config.toml`, this change brings the test suite from entirely failing to mostly passing. This change should not affect behavior for other crate types, or for targets which do not respect `+crt_static`.
-
由 bors 提交于
Allow writing metadata without llvm # Todo: * [x] Rebase * [x] Fix eventual errors * [x] <strike>Find some crate to write elf files</strike> (will do it later) Cc #43842
-
- 25 9月, 2017 17 次提交
-
-
由 Douglas Campos 提交于
-
由 Douglas Campos 提交于
-
由 Douglas Campos 提交于
-
由 Douglas Campos 提交于
-
由 Douglas Campos 提交于
-
由 bors 提交于
encode region::Scope using fewer bytes Now that region::Scope is no longer interned, its size is more important. This PR encodes region::Scope in 8 bytes instead of 12, which should speed up region inference somewhat (perf testing needed) and should improve the margins on #36799 by 64MB (that's not a lot, I did this PR mostly to speed up region inference). This is a perf-sensitive PR. Please don't roll me up. r? @EddyB This is based on #44743 so I could get more accurate measurements on #36799.
-
由 Felix S. Klock II 提交于
-
由 Felix S. Klock II 提交于
In particular: * introduce the shallow/deep distinction for read/write accesses * use the notions of prefixes, shallow prefixes, and supporting prefixes rather than trying to recreate the restricted sets from ast-borrowck. * Add shallow reads of Discriminant and ArrayLength, and treat them as artificial fields when doing prefix traversals.
-
由 Felix S. Klock II 提交于
-
由 Ariel Ben-Yehuda 提交于
-
由 bors 提交于
Compress most of spans to 32 bits As described in https://internals.rust-lang.org/t/rfc-compiler-refactoring-spans/1357/28 Closes https://github.com/rust-lang/rust/issues/15594 r? @michaelwoerister
-
由 David Tolnay 提交于
This is a partial revert of #42588. There is a usability concern reported in #44294 that was not considered in the discussion of the PR, so I would like to back this out of 1.21. As is, I think users would have a worse and more confusing experience with this lint enabled by default. We can re-enabled once there are better diagnostics or the case in #44294 does not trigger the lint.
-
由 bjorn3 提交于
-
由 bors 提交于
The Magenta kernel is now called Zircon.
-
由 James Tucker 提交于
* Adjust bootstrap to provide useful output on failure * Add missing package dependencies in the build environment * Fix permission bits on prebuilt toolchain files
-
由 James Tucker 提交于
-