bors
727eabd681
Auto merge of #53662 - kennytm:rollup, r=kennytm
...
Rollup of 16 pull requests
Successful merges:
- #53311 (Window Mutex: Document that we properly initialize the SRWLock)
- #53503 (Discourage overuse of mem::forget)
- #53545 (Fix #50865 : ICE on impl-trait returning functions reaching private items)
- #53559 (add macro check for lint)
- #53562 (Lament the invincibility of the Turbofish)
- #53563 (use String::new() instead of String::from(""), "".to_string(), "".to_owned() or "".into())
- #53592 (docs: minor stylistic changes to str/string docs)
- #53594 (Update RELEASES.md to include clippy-preview)
- #53600 (Fix a grammatical mistake in "expected generic arguments" errors)
- #53614 (update nomicon and book)
- #53617 (tidy: Stop requiring a license header)
- #53618 (Add missing fmt examples)
- #53636 (Prefer `.nth(n)` over `.skip(n).next()`.)
- #53644 (Use SmallVec for SmallCStr)
- #53664 (Remove unnecessary closure in rustc_mir/build/mod.rs)
- #53666 (Added rustc_codegen_llvm to compiler documentation.)
2018-08-24 17:02:23 +00:00
kennytm
a1ec2f76bb
Rollup merge of #53545 - FelixMcFelix:fix-50865-beta, r=petrochenkov
...
Fix #50865 : ICE on impl-trait returning functions reaching private items
Adds a test case as suggested in #50865 , and implements @petrochenkov's suggestion. Fixes #50865 .
Impl-trait-returning functions are marked under a new (low) access level, which they propagate rather than `AccessLevels::Reachable`. `AccessLevels::is_reachable` returns false for such items (leaving stability analysis unaffected), these items may still be visible to the lints phase however.
2018-08-24 23:27:16 +08:00
kennytm
9dfb95b11f
Rollup merge of #53636 - frewsxcv:frewsxcv-nth, r=rkruppe
...
Prefer `.nth(n)` over `.skip(n).next()`.
Found by clippy.
2018-08-24 19:24:44 +08:00
Sergio Benitez
ed0bd38cac
Stabilize 'attr_literals' feature.
2018-08-23 19:06:07 -07:00
Corey Farwell
9e0ff24b6d
Prefer .nth(n) over .skip(n).next().
...
Found by clippy.
2018-08-23 09:35:49 -04:00
bors
35bf1ae257
Auto merge of #52602 - scottmcm:tryblock-expr, r=nikomatsakis
...
Implement try block expressions
I noticed that `try` wasn't a keyword yet in Rust 2018, so...
~~Fixes https://github.com/rust-lang/rust/issues/52604~~ That was fixed by PR https://github.com/rust-lang/rust/pull/53135
cc https://github.com/rust-lang/rust/issues/31436 https://github.com/rust-lang/rust/issues/50412
2018-08-23 11:46:24 +00:00
Vadim Petrochenkov
b34503e60e
Stabilize a few secondary macro features
...
`tool_attributes`, `proc_macro_path_invoc`, partially `proc_macro_gen`
2018-08-23 01:13:17 +03:00
varkor
8a5dccde2a
Remove Ty prefix from Ty{Bool|Char|Int|Uint|Float|Str}
2018-08-22 16:08:49 +01:00
varkor
04fa5d3adb
Remove Ty prefix from Ty{Foreign|Param}
2018-08-22 16:07:55 +01:00
varkor
6f637da50c
Remove Ty prefix from Ty{Adt|Array|Slice|RawPtr|Ref|FnDef|FnPtr|Dynamic|Closure|Generator|GeneratorWitness|Never|Tuple|Projection|Anon|Infer|Error}
2018-08-22 16:07:44 +01:00
bors
9f9f2c0095
Auto merge of #53530 - kennytm:rollup, r=kennytm
...
Rollup of 17 pull requests
Successful merges:
- #53030 (Updated RELEASES.md for 1.29.0)
- #53104 (expand the documentation on the `Unpin` trait)
- #53213 (Stabilize IP associated constants)
- #53296 (When closure with no arguments was expected, suggest wrapping)
- #53329 (Replace usages of ptr::offset with ptr::{add,sub}.)
- #53363 (add individual docs to `core::num::NonZero*`)
- #53370 (Stabilize macro_vis_matcher)
- #53393 (Mark libserialize functions as inline)
- #53405 (restore the page title after escaping out of a search)
- #53452 (Change target triple used to check for lldb in build-manifest)
- #53462 (Document Box::into_raw returns non-null ptr)
- #53465 (Remove LinkMeta struct)
- #53492 (update lld submodule to include RISCV patch)
- #53496 (Fix typos found by codespell.)
- #53521 (syntax: Optimize some literal parsing)
- #53540 (Moved issue-53157.rs into src/test/ui/consts/const-eval/)
- #53551 (Avoid some Place clones.)
Failed merges:
r? @ghost
2018-08-21 16:04:11 +00:00
kennytm
0dd88c9797
Rollup merge of #53329 - frewsxcv:frewsxcv-ptr-add-sub, r=RalfJung
...
Replace usages of ptr::offset with ptr::{add,sub}.
Rust provides these helper methods – so let's use them!
2018-08-21 22:05:30 +08:00
kennytm
b5519db323
Rollup merge of #53496 - matthiaskrgr:codespell_08_2018, r=varkor
...
Fix typos found by codespell.
2018-08-21 17:51:49 +08:00
Kyle Simpson
3536359ad8
Further fixes.
2018-08-21 01:50:20 +01:00
Kyle Simpson
54b096a799
Fixes for code review.
2018-08-21 01:16:29 +01:00
Alexander Regueiro
e221fcce66
Removed raw_identifiers feature gate.
2018-08-20 21:57:56 +01:00
Corey Farwell
993fb93464
Replace usages of ptr::offset with ptr::{add,sub}.
2018-08-20 07:28:34 -04:00
Scott McMurray
9f683bed3d
Rename catch_expr feature to try_blocks
2018-08-19 16:53:43 -07:00
Scott McMurray
9e64ce1799
Parse try blocks with the try keyword instead of do catch placeholder
2018-08-19 16:53:05 -07:00
Scott McMurray
1c906093f9
Add try to syntax_pos as an edition-2018-only keyword
2018-08-19 16:30:53 -07:00
Jakub Kozlowski
00920c0024
Stabilize macro_vis_matcher
2018-08-19 17:08:00 +01:00
Matthias Krüger
71120ef1e5
Fix typos found by codespell.
2018-08-19 17:41:28 +02:00
Masaki Hara
800f2c13a3
Implement simple codegen for unsized rvalues.
2018-08-19 08:07:33 +09:00
bors
33b923fd44
Auto merge of #53324 - alexreg:self_in_typedefs, r=eddyb
...
`Self` in type definitions (self_in_typedefs)
This implements the [`self_in_typedefs` feature](https://github.com/rust-lang/rfcs/blob/master/text/2300-self-in-typedefs.md ) ([tracking issue 49303](https://github.com/rust-lang/rust/issues/49303 )).
r? @eddyb
CC @Centril
2018-08-18 19:34:24 +00:00
Alexander Regueiro
7920a65c5f
Added tests.
2018-08-18 18:56:31 +01:00
bors
c8c587fe4e
Auto merge of #50911 - petrochenkov:macuse, r=alexcrichton
...
Stabilize `use_extern_macros`
Closes https://github.com/rust-lang/rust/issues/35896
2018-08-17 19:10:34 +00:00
Corey Farwell
5c7b837c4e
Rollup merge of #53413 - eddyb:featured-in-the-latest-edition, r=varkor
...
Warn that `#![feature(rust_2018_preview)]` is implied when the edition is set to Rust 2018.
cc @varkor @petrochenkov @joshtriplett
2018-08-17 08:23:44 -07:00
Vadim Petrochenkov
674a5db1a5
Fix undesirable fallout
...
compile-fail-fulldeps/proc-macro/proc-macro-attributes.rs - resolution change for derive helper attributes with the same name as derive itself
run-pass/macro-comma-support.rs - indeterminate resolutions for macros in expression positions
ui/issues/issue-49074.rs - diagnostics regression, not enough recovery to report the second error
ui/object-lifetime/object-lifetime-default.stderr - unstable diagnostics?
2018-08-17 13:17:39 +03:00
Vadim Petrochenkov
a0958048b6
Stabilize use_extern_macros
2018-08-17 13:14:26 +03:00
Eduard-Mihai Burtescu
9b1d3c70ac
rustc_resolve: don't allow paths starting with ::crate.
2018-08-17 12:59:56 +03:00
Eduard-Mihai Burtescu
7a87e30f41
rustc_resolve: overhaul #![feature(uniform_paths)] error reporting.
2018-08-17 01:41:06 +03:00
Eduard-Mihai Burtescu
32e17b5921
tests: prefer edition: directives to compile-flags:--edition.
2018-08-16 10:36:11 +03:00
bors
5db71dbae8
Auto merge of #53133 - Zoxc:gen-int, r=eddyb
...
Record adjustments and original type for expressions in the generator interior
Fixes https://github.com/rust-lang/rust/issues/50878 and https://github.com/rust-lang/rust/issues/52398 .
r? @eddyb
2018-08-15 12:02:00 +00:00
bors
81cfaad030
Auto merge of #53212 - sunjay:nll-raw-cast, r=nikomatsakis
...
NLL - Prevent where clauses from extending the lifetime of bindings
Fixes https://github.com/rust-lang/rust/issues/53123
r? @nikomatsakis
2018-08-15 06:54:18 +00:00
kennytm
700c5e89f2
Rollup merge of #53208 - BurntPizza:protect-the-environment, r=alexcrichton
...
Don't panic on std::env::vars() when env is null.
Fixes #53200 .
Reviewer(s):
* Do I need to do any `#[cfg()]` here?
* Is this use of libc ok for a dev-dependency?
2018-08-14 23:59:05 +08:00
bors
d67ba90dab
Auto merge of #53335 - eddyb:issue-53333, r=petrochenkov
...
rustc_resolve: crates only exist in the type namespace.
Fixes #53333 by resolving `::crate_name` in `TypeNS` alone, which was overlooked in #52923 and didn't break tests, since having `use crate_name;` and a `crate_name` value in the same scope is rare.
2018-08-14 10:41:55 +00:00
Eduard-Mihai Burtescu
262392cd32
rustc_resolve: crates only exist in the type namespace.
2018-08-14 11:26:44 +03:00
bors
a8763b5370
Auto merge of #52895 - draganmladjenovic:minmax_qnan, r=alexcrichton
...
run-pass/simd-intrinsic-float-minmax: Force use of qNaN on Mips
Workaround for #52746 .
r? @gnzlbg
2018-08-14 06:31:10 +00:00
Taylor Cramer
39ce9ef00e
#[feature(uniform_paths)]: allow use x::y; to resolve through self::x, not just ::x.
2018-08-14 07:06:50 +03:00
Eduard-Mihai Burtescu
f9b1176eef
rustc_resolve: fix special-case for one-segment import paths.
2018-08-14 07:06:50 +03:00
BurntPizza
c9aca02320
Don't panic on std::env::vars() when env in null.
...
Fixes #53200
2018-08-09 12:56:42 -04:00
Sunjay Varma
5e7763381f
Added regression test for NLL raw pointer cast bug
2018-08-09 00:58:52 -06:00
kennytm
c1220610ef
Rollup merge of #53093 - 0e4ef622:issue-52169-fix, r=petrochenkov
...
Enable macros to pass $:literal to another macro
Fixes #52169 .
2018-08-07 16:55:43 +08:00
kennytm
3385cae74a
Rollup merge of #53068 - MajorBreakfast:spawn, r=cramertj
...
Rename Executor trait to Spawn
Renames the `Executor` trait to `Spawn` and the method on `Context` to `spawner`.
Note: Best only merge this after we've the alpha 3 announcement post ready.
r? @cramertj
2018-08-07 16:55:42 +08:00
John Kåre Alsaker
401af7994d
Record adjustments and original type for expressions in the generator interior
2018-08-07 04:44:35 +02:00
bors
11a902431b
Auto merge of #51007 - AstralSorcerer:master, r=nagisa
...
Make globals with private linkage unnamed. Fixes #50862 .
cc @oli-obk @nagisa
2018-08-07 02:12:35 +00:00
Josef Reinhard Brandl
60aa11df4c
Rename Executor trait to Spawn
2018-08-06 12:18:47 +02:00
Matthew Tran
3d44da65cd
Enable macros to pass $:literal to another macro
2018-08-05 11:02:59 -05:00
varkor
c157ec87ed
Fix 2018 edition tests
2018-08-05 15:54:49 +01:00
varkor
5815a84280
Remove references to unknown feature io
2018-08-05 15:54:49 +01:00