Commit Graph

7983 Commits

Author SHA1 Message Date
Guillaume Gomez 2d3236c68f Rollup merge of #56257 - mark-i-m:rustc-guide-links, r=nikomatsakis
rustc-guide has moved to rust-lang/

r? @nikomatsakis
2018-11-29 13:10:44 +01:00
Guillaume Gomez d1b0681bd7 Rollup merge of #56255 - jasonl:update-old-documents, r=michaelwoerister
Update outdated code comments in StringReader

For the detection of newlines in the lexer, this is now done in `analyze_source_file.rs`.
2018-11-29 13:10:43 +01:00
Guillaume Gomez 796892e0ef Rollup merge of #56220 - estebank:suggest-lifetime-move, r=nikomatsakis
Suggest appropriate place for lifetime when declared after type arguments
2018-11-29 13:10:39 +01:00
Mark Mansi 59ae93daed remove uses of feature gate 2018-11-27 13:13:11 -06:00
Mark Mansi 32aafb2203 remove some unused vars 2018-11-27 13:08:41 -06:00
Mark Mansi a542e48871 remove feature gate 2018-11-27 13:08:41 -06:00
Mark Mansi c75ed34732 move feature gate to accepted 2018-11-27 13:08:41 -06:00
bors 10e2c729ea Auto merge of #55402 - estebank:macro-eof-2, r=nikomatsakis
Point at end of macro arm when encountering EOF

Fix #52866.
2018-11-27 12:31:45 +00:00
Esteban Küber 6f028fe8e0 Specify suggestion applicability 2018-11-26 13:58:46 -08:00
Vadim Petrochenkov dae4c7b1ff resolve: Implement edition hygiene for imports and absolute paths
Use per-span hygiene in a few other places in resolve
Prefer `rust_2015`/`rust_2018` helpers to comparing editions
2018-11-27 00:32:30 +03:00
Mark Mansi 6494f1e60e rustc-guide has moved 2018-11-26 15:03:13 -06:00
Jason Langenauer cd20be5091 Update outdated code comments in StringReader 2018-11-26 21:21:17 +01:00
Esteban Küber 45dfe43887 Emit one diagnostic for multiple misplaced lifetimes 2018-11-26 08:32:47 -08:00
Esteban Küber 234d043d18 Move lifetimes before the *first* type argument 2018-11-25 12:51:04 -08:00
Esteban Küber 79ee8f329d Suggest appropriate place for lifetime when declared after type arguments 2018-11-25 12:41:38 -08:00
Pietro Albini b16d8eb3f2 Rollup merge of #56072 - da-x:stabilize-literal-matcher, r=petrochenkov
Stabilize macro_literal_matcher

This followed FCP in #35625.

Closes #35625
2018-11-25 17:05:00 +01:00
Esteban Küber d011313d84 Reword EOF in macro arm message 2018-11-23 15:49:31 -08:00
Esteban Küber c45871ba02 Keep label on moved spans and point at macro invocation on parse error 2018-11-23 15:37:31 -08:00
Esteban Küber 76449d86c0 Point at macro arm when it doesn't expand to an expression 2018-11-23 15:37:31 -08:00
Esteban Küber e5cd1edfa1 Reword incorrect macro invocation primary label 2018-11-23 15:37:31 -08:00
Esteban Küber 34bd86a3fd Add label when replacing primary DUMMY_SP in macro expansion 2018-11-23 15:37:31 -08:00
Esteban Küber ea9ccb6046 Point at end of macro arm when encountering EOF
Fix #52866
2018-11-23 15:37:31 -08:00
Guillaume Gomez 75d226ed76 Rollup merge of #56002 - Axary:master, r=estebank
fix #55972: Erroneous self arguments on bare functions emit subpar compilation error

#55972

r? @estebank
2018-11-22 10:37:50 +01:00
Dan Aloni b8ae7b801b macro_literal_matcher: fixes per petrochenkov's review 2018-11-21 21:31:47 +02:00
Dan Aloni fc284c1eee Stabilize macro_literal_matcher 2018-11-21 21:31:46 +02:00
Vadim Petrochenkov 1af682a557 Stabilize extern_crate_item_prelude 2018-11-21 01:27:23 +03:00
Axary 88d60941da improve error note 2018-11-20 14:43:16 +01:00
bors 046e054a99 Auto merge of #55983 - oli-obk:static_, r=Mark-Simulacrum
Fix stability hole with `static _`

The `underscore_const_names` only gated const items with `_` as the name.

`static _: () = ();` works on beta without feature gates right now, this PR fixes that.
2018-11-20 03:05:11 +00:00
bors 5aff30734b Auto merge of #55971 - SergioBenitez:skip-non-semantic, r=alexcrichton
Ignore non-semantic tokens for 'probably_eq' streams.

Improves the situation in #43081 by skipping typically non-semantic tokens when checking for 'probably_eq'.

r? @alexcrichton
2018-11-19 19:57:02 +00:00
bors 9e8a982a23 Auto merge of #56051 - pietroalbini:rollup, r=pietroalbini
Rollup of 25 pull requests

Successful merges:

 - #55562 (Add powerpc- and powerpc64-unknown-linux-musl targets)
 - #55564 (test/linkage-visibility: Ignore on musl targets)
 - #55827 (A few tweaks to iterations/collecting)
 - #55834 (Forward the ABI of the non-zero sized fields of an union if they have the same ABI)
 - #55857 (remove unused dependency)
 - #55862 (in which the E0618 "expected function" diagnostic gets a makeover)
 - #55867 (do not panic just because cargo failed)
 - #55894 (miri enum discriminant handling: Fix treatment of pointers, better error when it is undef)
 - #55916 (Make miri value visitor useful for mutation)
 - #55919 (core/tests/num: Simplify `test_int_from_str_overflow()` test code)
 - #55923 (reword #[test] attribute error on fn items)
 - #55949 (ty: return impl Iterator from Predicate::walk_tys)
 - #55952 (Update to Clang 7 on CI.)
 - #55953 (#53488 Refactoring UpvarId)
 - #55962 (rustdoc: properly calculate spans for intra-doc link resolution errors)
 - #55963 (Stress test for MPSC)
 - #55968 (Clean up some non-mod-rs stuff.)
 - #55970 (Miri backtrace improvements)
 - #56007 (CTFE: dynamically make sure we do not call non-const-fn)
 - #56011 (Replace data.clone() by Arc::clone(&data) in mutex doc.)
 - #56012 (avoid shared ref in UnsafeCell::get)
 - #56016 (Add VecDeque::resize_with)
 - #56027 (docs: Add missing backtick in object_safety.rs docs)
 - #56043 (remove "approx env bounds" if we already know from trait)
 - #56059 (Increase `Duration` approximate equal threshold to 1us)
2018-11-19 14:07:45 +00:00
Pietro Albini 6ecbb05d76 Rollup merge of #55968 - ehuss:non-mod-rs-tests, r=petrochenkov
Clean up some non-mod-rs stuff.

This includes the following:
- Remove unused `non_modrs_mods` from `ParseSess` which as only used for feature gate diagnostics.
- Remove the vestiges of the feature gate tests in `test/ui`, they were only partially removed during stabilization.
- Fix the run-pass test, it was accidentally removed during stabilization.
- Add a ui test to verify error behavior for missing inline-nested mods.
- Add some tests for `#[path]` for inline-nested mods (both mod and non-mod-rs).
- Enable the diagnostic tests on windows, they should be fixed by #49478.

cc @cramertj
2018-11-19 22:06:26 +08:00
Vadim Petrochenkov 4c5d822a8b resolve: Check resolution consistency for import paths and multi-segment macro paths 2018-11-18 13:55:58 +03:00
Sergio Benitez 78eb516dda Ignore non-semantic tokens for 'probably_eq' streams. 2018-11-16 23:37:23 -08:00
Axary 2be930bd03 fix tidy (remove whitespace) 2018-11-16 19:35:13 +01:00
Axary fe23ffbda0 improve error when self is used as not the first argument 2018-11-16 19:27:27 +01:00
Axary 646d68f585 add a note to the error message 2018-11-16 18:43:06 +01:00
Axary 218e35efa1 eat CloseDelim 2018-11-16 13:54:49 +01:00
Oliver Scherer c8a9300d8e Fix stability hole with static _ 2018-11-15 16:16:34 +01:00
Pietro Albini 66fcb3ceb2 Rollup merge of #55901 - euclio:speling, r=petrochenkov
fix various typos in doc comments
2018-11-15 11:04:42 +01:00
Pietro Albini 1d5829d87f Rollup merge of #55750 - oli-obk:node_id_x, r=michaelwoerister
Make `NodeId` and `HirLocalId` `newtype_index`
2018-11-15 11:04:35 +01:00
Eric Huss 7f4bc2247a Clean up some non-mod-rs stuff. 2018-11-14 18:55:41 -08:00
Andy Russell 4e35cbb22e fix various typos in doc comments 2018-11-13 14:45:31 -05:00
kennytm 64ea02a9dd Rollup merge of #55905 - nnethercote:short_name-to-literal_name, r=Mark-Simulacrum
Change `Lit::short_name` to `Lit::literal_name`.

This avoids a moderately hot allocation in `parse_lit_token`.

r? @Mark-Simulacrum
2018-11-13 19:21:01 +08:00
kennytm 5ccc76fe5c Rollup merge of #55870 - waywardmonkeys:typo-fixes, r=wesleywiser
Fix typos.
2018-11-13 19:20:44 +08:00
kennytm 98bc7d63fb Rollup merge of #55805 - nnethercote:mv-static_assert, r=Mark-Simulacrum
Move `static_assert!` into librustc_data_structures
2018-11-13 19:20:28 +08:00
Nicholas Nethercote 2bd4d5b1a0 Move two static_assert!s to better spots.
And make them x86_64-only so they can use `==` instead of `<=`.
2018-11-13 11:30:43 +11:00
Nicholas Nethercote fb3dd9f64e Add a static assertion about the size of ast::Expr. 2018-11-13 06:37:16 +11:00
Oliver Scherer 4c9ee59584 Reintroduce the original debug formatting for NodeIds 2018-11-12 10:29:53 +01:00
Oliver Scherer 39a0969e64 Make NodeId a newtype_index to enable niche optimizations 2018-11-12 10:29:53 +01:00
Nicholas Nethercote c6862992d9 Change Lit::short_name to Lit::literal_name.
This avoids a moderately hot allocation in `parse_lit_token`.
2018-11-12 15:16:03 +11:00