- 07 10月, 2018 7 次提交
-
-
由 bors 提交于
Stabilize `min_const_fn` tracking issue: #53555 r? @Centril
-
由 bors 提交于
Fix two UI tests with locale-dependent output Closes https://github.com/rust-lang/rust/issues/54719
-
由 bors 提交于
Add tests for some E-needstest issues Fixes #28134. Fixes #24338. Fixes #29743.
-
由 bors 提交于
rustc: Allow `#[no_mangle]` anywhere in a crate This commit updates the compiler to allow the `#[no_mangle]` (and `#[export_name]` attributes) to be located anywhere within a crate. These attributes are unconditionally processed, causing the compiler to always generate an exported symbol with the appropriate name. After some discussion on #54135 it was found that not a great reason this hasn't been allowed already, and it seems to match the behavior that many expect! Previously the compiler would only export a `#[no_mangle]` symbol if it were *publicly reachable*, meaning that it itself is `pub` and it's otherwise publicly reachable from the root of the crate. This new definition is that `#[no_mangle]` *is always reachable*, no matter where it is in a crate or whether it has `pub` or not. This should make it much easier to declare an exported symbol with a known and unique name, even when it's an internal implementation detail of the crate itself. Note that these symbols will persist beyond LTO as well, always making their way to the linker. Along the way this commit removes the `private_no_mangle_functions` lint (also for statics) as there's no longer any need to lint these situations. Furthermore a good number of tests were updated now that symbol visibility has been changed. Closes #54135
-
由 bors 提交于
NLL: temps in block tail expression diagnostic This change adds a diagnostic that explains when temporaries in a block tail expression live longer than block local variables that they borrow, and attempts to suggest turning the tail expresion into a statement (either by adding a semicolon at the end, when its result value is clearly unused, or by introducing a `let`-binding for the result value and then returning that). Fix #54556
-
由 Alex Crichton 提交于
This commit updates the compiler to allow the `#[no_mangle]` (and `#[export_name]` attributes) to be located anywhere within a crate. These attributes are unconditionally processed, causing the compiler to always generate an exported symbol with the appropriate name. After some discussion on #54135 it was found that not a great reason this hasn't been allowed already, and it seems to match the behavior that many expect! Previously the compiler would only export a `#[no_mangle]` symbol if it were *publicly reachable*, meaning that it itself is `pub` and it's otherwise publicly reachable from the root of the crate. This new definition is that `#[no_mangle]` *is always reachable*, no matter where it is in a crate or whether it has `pub` or not. This should make it much easier to declare an exported symbol with a known and unique name, even when it's an internal implementation detail of the crate itself. Note that these symbols will persist beyond LTO as well, always making their way to the linker. Along the way this commit removes the `private_no_mangle_functions` lint (also for statics) as there's no longer any need to lint these situations. Furthermore a good number of tests were updated now that symbol visibility has been changed. Closes #54135
-
由 bors 提交于
Cleanup rustc/middle - improve allocations - use `Cow<'static, str>` where applicable - improve some patterns - whitespace & formatting fixes
-
- 06 10月, 2018 26 次提交
-
-
由 bors 提交于
wasm: Explicitly export all symbols with LLD This commit fixes an oddity on the wasm target where LTO can produce working executables but plain old optimizations doesn't. The compiler already knows what set of symbols it would like to export, but LLD only discovers this list transitively through symbol visibilities. LLD may not, however, always find all the symbols that we'd like to export. For example if you depend on an rlib with a `#[no_mangle]` symbol, then if you don't actually use anything from the rlib then the symbol won't appear in the final artifact! It will appear, however, with LTO. This commit attempts to rectify this situation by ensuring that all symbols rustc would otherwise preserve through LTO are also preserved through the linking process with LLD by default.
-
由 ljedrz 提交于
-
由 ljedrz 提交于
-
由 ljedrz 提交于
-
由 ljedrz 提交于
-
由 Matthias Krüger 提交于
-
由 bors 提交于
Rollup of 11 pull requests Successful merges: - #54078 (Expand the documentation for the `std::sync` module) - #54717 (Cleanup rustc/ty part 1) - #54781 (Add examples to `TyKind::FnDef` and `TyKind::FnPtr` docs) - #54787 (Only warn about unused `mut` in user-written code) - #54804 (add suggestion for inverted function parameters) - #54812 (Regression test for #32382.) - #54833 (make `Parser::parse_foreign_item()` return a foreign item or error) - #54834 (rustdoc: overflow:auto doesn't work nicely on small screens) - #54838 (Fix typo in src/libsyntax/parse/parser.rs) - #54851 (Fix a regression in 1.30 by reverting #53564) - #54853 (Remove unneccessary error from test, revealing NLL error.) Failed merges: r? @ghost
-
由 Pietro Albini 提交于
Remove unneccessary error from test, revealing NLL error. Part of #52663. Removes unnecessary type mismatch error from test that was hiding borrow check error from NLL stderr. r? @nikomatsakis
-
由 Pietro Albini 提交于
Fix a regression in 1.30 by reverting #53564 Investigation on #54477 revealed https://github.com/rust-lang/rust/pull/53564 as the culprit in the regression for that crate. I've reproduced the regression with the [detailed test cases provided](https://github.com/rust-lang/rust/issues/54477#issuecomment-427398456). While we figure out how to fix the regression this commit reverts the current culprit.
-
由 Pietro Albini 提交于
Fix typo in src/libsyntax/parse/parser.rs contast -> contrast
-
由 Pietro Albini 提交于
rustdoc: overflow:auto doesn't work nicely on small screens This property was introduced by 3f92ff34, but looks it doesn't overwrap even without the property. Fixes #54672.
-
由 Pietro Albini 提交于
make `Parser::parse_foreign_item()` return a foreign item or error Fixes `Parser::parse_foreign_item()` to follow the convention of `parse_trait_item()` and `parse_impl_item()` in that it *must* parse an item or return an error, and then the caller is responsible for detecting the closing delimiter. This prevents it from looping endlessly on an unexpected token in `ext/expand.rs` where it was also leaking memory by continually pushing to `Parser::expected_tokens` via `Parser::check_keyword()`. closes #54441 r? @petrochenkov cc @dtolnay
-
由 Pietro Albini 提交于
Regression test for #32382.
-
由 Pietro Albini 提交于
add suggestion for inverted function parameters Fixes #54065.
-
由 Pietro Albini 提交于
Only warn about unused `mut` in user-written code Fixes https://github.com/rust-lang/rust/issues/54586. r? @pnkfelix cc @blitzerr
-
由 Pietro Albini 提交于
Add examples to `TyKind::FnDef` and `TyKind::FnPtr` docs This adds two examples to the docs of `TyKind::FnDef` and `TyKind::FnPtr`. I found these two types a bit confusing when I learned about them and I think adding these examples might help others.
-
由 Pietro Albini 提交于
Cleanup rustc/ty part 1 Part 2 will follow soon; I wouldn't want these changes to rot too quickly. - improve stack shifting and remove related allocations - move a faster early return up - improve allocations - use Cow<str> where applicable - simplify common patterns - whitespace fixes
-
由 Pietro Albini 提交于
Expand the documentation for the `std::sync` module I've tried to expand the documentation for Rust's synchronization primitives. The module level documentation explains why synchronization is required when working with a multiprocessor system, and then links to the appropiate structure in this module. Fixes #29377, since this should be the last item on the checklist (documentation for `Atomic*` was fixed in #44854, but not ticked off the checklist).
-
由 bors 提交于
Cleanup rustc/ty part 2 The second part of cleanups and minor improvements for rustc/ty. - improve allocations - calculate span after a possible early continue - simplify some patterns - mark a comment as FIXME - whitespace fixes The PR is independent from from the first part.
-
由 David Wood 提交于
Removes unnecessary type mismatch error from test that was hiding borrow check error from NLL stderr.
-
由 Alex Crichton 提交于
This reverts commit 6ce76aca.
-
由 Alex Crichton 提交于
This reverts commit 11e488b6.
-
由 Alex Crichton 提交于
This reverts commit 1a1a7f61.
-
由 Alex Crichton 提交于
This reverts commit 1908892d.
-
由 Alex Crichton 提交于
This reverts commit 21d2a6c9.
- 05 10月, 2018 7 次提交
-
-
由 bors 提交于
Nest the `impl Trait` existential item inside the return type fixes #54045 r? @cramertj
-
由 Andy Russell 提交于
Fixes #54065.
-
由 bors 提交于
resolve: Some refactorings in preparation for uniform paths 2.0 The main result is that in-scope resolution performed during macro expansion / import resolution is now consolidated in a single function (`fn early_resolve_ident_in_lexical_scope`), which can now be used for resolving first import segments as well when uniform paths are enabled. r? @ghost
-
由 Oliver Scherer 提交于
-
由 Oliver Scherer 提交于
-
由 Felix S. Klock II 提交于
-
由 bors 提交于
Merge `proc_macro_` expansion feature gates as `proc_macro_hygiene` Merges `proc_macro_mod`, `proc_macro_expr`, `proc_macro_non_items`, and `proc_macro_gen` into a single feature: `proc_macro_hygiene`. These features are not all blocked on implementing macro hygiene *per se*, but rather on interactions with hygiene that have not been entirely resolved.
-