- 07 9月, 2018 9 次提交
-
-
由 kennytm 提交于
librustc_lint: In recursion warning, change 'recurring' to 'recursing' The existing wording seems incorrect. Aside: This warning, 'function cannot return without recursing' is not perfectly clear - it implies that the function _can_ return, it's just got to recurse. But really the fn cannot return period. Clearer wording: 'function recurses infinitely; it cannot return'; or 'function is infinitely self-recursive; it cannot return, and this is probably an error'. I like that.
-
由 kennytm 提交于
Individual docs for {from,to}_*_bytes
-
由 kennytm 提交于
Cross reference io::copy and fs::copy in docs. Fixes https://github.com/rust-lang/rust/issues/52524.
-
由 kennytm 提交于
Updated core/macros.rs to note it works in a no_std environment. Fixes #45797 This PR updates the documentation of `write!` to note it works in a `no_std` environment, and adds an example to showcase this. In a `no_std` environment, the author of the code is responsible for the implementation of the `Write` trait. This example will work out of the box with `no_std`, but the implementation of `Write` is expected to be provided by the user. r? @steveklabnik
-
由 bors 提交于
Update the compiler-builtins submodule Fixes a mistake in using C shims to... Closes #53916
-
由 bors 提交于
rustc_resolve: allow `use crate_name;` under `uniform_paths`. Specifically, `use crate_name;` and `use crate_name::{self, ...};` are now allowed, whereas previously there would produce a (false positive) ambiguity error, as the ambiguity detection code was seeing the `crate_name` import as a locally-available definition to conflict with the crate. r? @petrochenkov cc @aturon @joshtriplett @Centril
-
由 bors 提交于
Don't reduce E0161 to a warning in NLL migrate mode This error has been on stable for a while, and allowing such code cause the compile to later ICE (since we can't codegen it). Errors `box UNSIZED EXPR` with unsized locals because it's not compatible with the current evaluation order (create the box before evaluating the expressions). cc #53469 (fixes the ICE in this case) cc @qnighy
-
由 Eduard-Mihai Burtescu 提交于
-
由 bors 提交于
Fix issue #52475: Make loop detector only consider reachable memory As [suggested](https://github.com/rust-lang/rust/pull/51702#discussion_r197585664) by @oli-obk `alloc_id`s should be ignored by traversing all `Allocation`s in interpreter memory at a given moment in time, beginning by `ByRef` locals in the stack. - [x] Generalize the implementation of `Hash` for `EvalSnapshot` to traverse `Allocation`s - [x] Generalize the implementation of `PartialEq` for `EvalSnapshot` to traverse `Allocation`s - [x] Commit regression tests Fixes #52626 Fixes https://github.com/rust-lang/rust/issues/52849
-
- 06 9月, 2018 10 次提交
-
-
由 bors 提交于
rustc_typeck: turn `where Type:,` into a WF(Type) predicate, instead of ignoring it. Fixes #53696, assuming crater doesn't catch anyone using this syntax already. Allowing an empty list of bounds in the grammar was done for the benefit of macro authors, most of which would *probably* be using it for bounds on type parameters, which are always WF. r? @nikomatsakis cc @petrochenkov
-
由 bors 提交于
fix `is_non_exhaustive` confusion between structs and enums Structs and enums can both be non-exhaustive, with a very different meaning. This PR splits `is_non_exhaustive` to 2 separate functions - 1 for structs, and another for enums, and fixes the places that got the usage confused. Fixes #53549. r? @EddyB
-
由 bors 提交于
rustbuild: Tweak LLVM distribution layout This commit tweaks the layout of a few components that we distribute to hopefully fix across all platforms the recent issues with LLD being unable to find the LLVM shared object. In #53245 we switched to building LLVM as a dynamic library, which means that LLVM tools by default link to LLVM dynamically rather than statically. This in turn means that the tools, at runtime, need to find the LLVM shared library. LLVM's shared library is currently distributed as part of the rustc component. This library is located, however, at `$sysroot/lib`. The LLVM tools we ship are in two locations: * LLD is shipped at `$sysroot/lib/rustlib/$host/bin/rust-lld` * Other LLVM tools are shipped at `$sysroot/bin` Each LLVM tool has an embedded rpath directive indicating where it will search for dynamic libraries. This currently points to `../lib` and is presumably inserted by LLVM's build system. Unfortunately, though, this directive is only correct for the LLVM tools at `$sysroot/bin`, not LLD! This commit is targeted at fixing this situation by making two changes: * LLVM tools other than LLD are moved in the distribution to `$sysroot/lib/rustlib/$host/bin`. This moves them next to LLD and should position them for... * The LLVM shared object is moved to `$sysroot/lib/rustlib/$host/lib` Together this means that all tools should natively be able to find the shared object and the shared object should be installed all the time for the various tools. Overall this should... Closes #53813
-
由 bors 提交于
Add trim_start, trim_end etc.; deprecate trim_left, trim_right, etc. in future Adds the methods: `trim_start`, `trim_end`, `trim_start_matches` and `trim_end_matches`. Deprecates `trim_left`, `trim_right`, `trim_left_matches` and `trim_right_matches` starting from Rust 1.33.0, three versions from when they'll initially be marked as being deprecated, using the future deprecation from https://github.com/rust-lang/rust/issues/30785 and https://github.com/rust-lang/rust/pull/51681. Fixes https://github.com/rust-lang/rust/issues/30459.
-
由 bors 提交于
ThinLTO: Don't keep files open after mmaping them. Fixes #53947. r? @alexcrichton
-
由 Andre Bogus 提交于
-
由 Tom Tromey 提交于
-
由 Alex Crichton 提交于
This commit tweaks the layout of a few components that we distribute to hopefully fix across all platforms the recent issues with LLD being unable to find the LLVM shared object. In #53245 we switched to building LLVM as a dynamic library, which means that LLVM tools by default link to LLVM dynamically rather than statically. This in turn means that the tools, at runtime, need to find the LLVM shared library. LLVM's shared library is currently distributed as part of the rustc component. This library is located, however, at `$sysroot/lib`. The LLVM tools we ship are in two locations: * LLD is shipped at `$sysroot/lib/rustlib/$host/bin/rust-lld` * Other LLVM tools are shipped at `$sysroot/bin` Each LLVM tool has an embedded rpath directive indicating where it will search for dynamic libraries. This currently points to `../lib` and is presumably inserted by LLVM's build system. Unfortunately, though, this directive is only correct for the LLVM tools at `$sysroot/bin`, not LLD! This commit is targeted at fixing this situation by making two changes: * LLVM tools other than LLD are moved in the distribution to `$sysroot/lib/rustlib/$host/bin`. This moves them next to LLD and should position them for... * The LLVM shared object is moved to `$sysroot/lib/rustlib/$host/lib` Together this means that all tools should natively be able to find the shared object and the shared object should be installed all the time for the various tools. Overall this should... Closes #53813
-
由 Alex Crichton 提交于
Fixes a mistake in using C shims to... Closes #53916
-
- 05 9月, 2018 19 次提交
-
-
由 bors 提交于
rustc: Prepare the `atomics` feature for wasm This commit adds a few changes for atomic instructions on the `wasm32-unknown-unknown` target. Atomic instructions are not yet stable in WebAssembly itself but there are multiple implementations and LLVM has support for the proposed instruction set, so let's work on exposing it! Here there are a few inclusions: * The `atomics` feature was whitelisted for LLVM, allowing code in Rust to enable/disable/gate on this. * The `singlethread` option is turned off for wasm when the `atomics` feature is enabled. This means that by default wasm won't be lowering with atomics, but when atomics are enabled globally we'll turn off single-threaded mode to actually codegen atomics. This probably isn't what we'll want in the long term but for now it should work. * Finally the maximum atomic width is increased to 64 to reflect the current wasm spec.
-
由 Siva Prasad 提交于
-
由 MagnumOpus21 提交于
-
由 MagnumOpus21 提交于
-
由 MagnumOpus21 提交于
-
由 MagnumOpus21 提交于
-
由 MagnumOpus21 提交于
-
由 MagnumOpus21 提交于
-
由 Michael Woerister 提交于
-
由 bors 提交于
Make json test output formatter represent "test_count" as num fixes #53866
-
由 bors 提交于
Introduce Custom Test Frameworks Introduces `#[test_case]` and `#[test_runner]` and re-implements `#[test]` and `#[bench]` in terms of them. Details found here: https://blog.jrenner.net/rust/testing/2018/08/06/custom-test-framework-prop.html
-
由 John Renner 提交于
-
由 John Renner 提交于
-
由 John Renner 提交于
-
由 John Renner 提交于
-
由 bors 提交于
Update Cargo.lock This also includes major version bumps for the rand crate used by core, std, and alloc tests, among other crates (regex, etc.) used elsewhere. Since these are all internal there should be no user-visible changes. r? @alexcrichton
-
由 bors 提交于
Allow to check if sync::Once is already initialized Hi! I propose to expose a way to check if a `Once` instance is initialized. I need it in `once_cell`. `OnceCell` is effetively a pair of `(Once, UnsafeCell<Option<T>>)`, which can set the `T` only once. Because I can't check if `Once` is initialized, I am forced to add an indirection and check the value of ptr instead: https://github.com/matklad/once_cell/blob/8127a81976c3f2f4c0860562c3f14647ebc025c0/src/lib.rs#L423-L429 https://github.com/matklad/once_cell/blob/8127a81976c3f2f4c0860562c3f14647ebc025c0/src/lib.rs#L457-L461 The `parking_lot`'s version of `Once` exposes the state as an enum: https://docs.rs/parking_lot/0.6.3/parking_lot/struct.Once.html#method.state. I suggest, for now, just to add a simple `bool` function: this fits my use-case perfectly, exposes less implementation details, and is forward-compatible with more fine-grained state checking.
-
由 Mark Rousskov 提交于
-
由 Tom Tromey 提交于
commit 6c101422 ("Update LLVM submodule") disabled the lldb build. This patch updates the lldb and clang submodules to once again build against the LLVM that is included in the Rust tree, and reverts the .travis.yml changes from that patch.
-
- 04 9月, 2018 2 次提交
-
-
由 bors 提交于
Update RLS and Rustfmt RLS * Allow project model to download crates ([#1020](https://github.com/rust-lang-nursery/rls/pull/1020)) * Support simple external builds ([#988](https://github.com/rust-lang-nursery/rls/pull/988)) * Support using external Rustfmt ([#990](https://github.com/rust-lang-nursery/rls/pull/990)) Rustfmt (0.99.4) * Format chains with comment ([#2899](https://github.com/rust-lang-nursery/rls/pull/2899)) * Do not show wildcard pattern in slice pattern ([#2912](https://github.com/rust-lang-nursery/rls/pull/2912)) * Impl only use ([#2951](https://github.com/rust-lang-nursery/rls/pull/2951)) * ... and [more](https://github.com/rust-lang-nursery/rustfmt/compare/5c9a2b6c13d3b6f8d3f9c02b130bb4b54fd489fb...1c408818c8a752dd584e7858b4afd3ceb011a7da) Bumped in tandem to pull a single version of `rustc-ap-*` libs. r? @nrc
-
由 Igor Matuszewski 提交于
-