Pietro Albini
23636e3f99
Rollup merge of #54350 - Munksgaard:support-edition-in-doc-test, r=steveklabnik
...
Support specifying edition in doc test
Fixes #52623
r? @QuietMisdreavus
2018-09-22 09:56:30 +02:00
Philip Munksgaard
c996c4d316
Add support for running doc test in specific edition
2018-09-19 14:32:09 +02:00
varkor
cb594cf373
Treat dyn as a keyword in the 2018 edition
2018-09-16 23:34:42 +01:00
toidiu
731f4efae5
stabalize infer outlives requirements (RFC 2093).
...
Co-authored-by: nikomatsakis
2018-09-11 11:40:04 -04:00
bors
2d4e34ca8b
Auto merge of #53778 - petrochenkov:shadrelax2, r=nikomatsakis
...
resolve: Relax shadowing restrictions on macro-expanded macros
Previously any macro-expanded macros weren't allowed to shadow macros from outer scopes.
Now only "more macro-expanded" macros cannot shadow "less macro-expanded" macros.
See comments to `fn may_appear_after` and added tests for more details and examples.
The functional changes are a21f6f588fc28c97533130ae44a6957b579ab58c and 46dd365ce9ca0a6b8653849b80267763c542842a, other commits are refactorings.
2018-09-09 21:00:55 +00:00
Mark Rousskov
4d1ec81811
Stabilize the 2018 edition
2018-09-09 02:28:13 +02:00
Vadim Petrochenkov
27235698f5
resolve: Introduce "may appear after" abstraction for macro path resolutions
2018-09-08 14:15:11 +03:00
Eduard-Mihai Burtescu
93f3f5b155
Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.
2018-08-28 17:04:04 +03:00
bors
70a21e89f1
Auto merge of #53441 - toidiu:ak-fix53419, r=nikomatsakis
...
fix for late-bound regions
Fix for https://github.com/rust-lang/rust/issues/53419
r? @nikomatsakis
2018-08-27 17:42:45 +00:00
Niko Matsakis
73fb1622b3
check that adding infer-outlives requirement to all crates works
2018-08-24 17:10:50 -04:00
Vadim Petrochenkov
6fdb400ff2
Revert "hygiene: Make sure expansion info is set at most once for a given Mark"
...
This reverts commit b15785b671 .
2018-08-24 02:21:52 +03: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
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
Scott McMurray
91967a8f16
Put try in the reserved list, not the in-use list
2018-08-19 16:53:41 -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
Scott McMurray
f2445fb507
Rename Catch variants to TryBlock
...
(Not `Try` since `QuestionMark` is using that.)
2018-08-19 16:30:53 -07:00
Donato Sciarra
062bfbf39b
mv codemap source_map
2018-08-19 23:01:01 +02:00
Donato Sciarra
cbd0595710
mv filemap source_file
2018-08-19 23:00:59 +02:00
Donato Sciarra
d6dcbcd4e1
mv FileMap SourceFile
2018-08-19 23:00:59 +02:00
Donato Sciarra
c655473378
mv CodeMap SourceMap
2018-08-19 23:00:59 +02:00
Matthias Krüger
71120ef1e5
Fix typos found by codespell.
2018-08-19 17:41:28 +02:00
memoryruins
01c598aa0d
[nll] libsyntax_pos: enable feature(nll) for bootstrap
2018-08-09 06:51:42 -04:00
Mark Rousskov
683a3db01f
Switch to bootstrapping from 1.29 beta
2018-08-01 11:59:08 -06:00
bors
6323d9a45b
Auto merge of #52355 - pietroalbini:zfeature, r=eddyb
...
Add the -Zcrate-attr=foo unstable rustc option
This PR adds a new unstable option to `rustc`: `-Zcrate-attr=foo`. The option can be used to inject crate-level attributes from the CLI, and it's meant to be used by tools like Crater that needs to add their own attributes to a crate without changing the source code.
The exact reason I need this is to implement "edition runs" in Crater: we need to add the preview feature flag to every crate, and editing the crates' source code on the fly might produce unexpected results, while a compiler flag is more reliable.
cc https://github.com/rust-lang-nursery/crater/issues/282 @Mark-Simulacrum
2018-07-28 23:10:10 +00:00
kennytm
7da22148ec
Rollup merge of #52703 - ljedrz:vec_improvements, r=nikomatsakis
...
Improve a few vectors - calculate capacity or build from iterators
Collecting from iterators improves readability and tailoring vector capacities should be beneficial in terms of performance.
2018-07-28 16:24:57 +08:00
Pietro Albini
71276c6abc
Add the -Zcrate-attr=foo nightly rustc flag to inject crate attributes
2018-07-27 19:51:21 +02:00
ljedrz
acd38f656a
Improve a few vectors - calculate capacity or build from iterators
2018-07-26 21:48:38 +02:00
Tatsuyuki Ishi
e098985939
Deny bare_trait_objects globally
2018-07-25 10:25:29 +09:00
bors
c7cba3d33f
Auto merge of #52024 - oli-obk:existential_parse, r=nikomatsakis
...
Implement existential types
(not for associated types yet)
r? @nikomatsakis
cc @Centril @varkor @alexreg
2018-07-19 21:14:01 +00:00
Esteban Küber
ed362c07ff
Do not use desugared ident when suggesting adding a type
2018-07-18 10:02:15 -07:00
Oliver Schneider
53d2ebb0ad
Implement existential types
2018-07-18 10:53:08 +02:00
Vadim Petrochenkov
4d1a30c92b
Remove most of PartialEq impls from AST and HIR structures
2018-07-14 14:56:57 +03:00
ljedrz
5058af7003
Deny bare trait objects in the rest of rust
2018-07-12 13:50:22 +02:00
Vadim Petrochenkov
fc74e35981
Remove fallback to parent modules from lexical resolution
2018-07-08 18:16:09 +03:00
Vadim Petrochenkov
94ef9f57f5
hygiene: Decouple transparencies from expansion IDs
2018-07-08 16:17:37 +03:00
Vadim Petrochenkov
01b6d7cc6f
libsyntax_pos: Tweak some visibilities
2018-07-08 16:17:36 +03:00
Vadim Petrochenkov
84f1bc8b66
Address comments
2018-06-30 01:53:32 +03:00
Vadim Petrochenkov
9f92fce77c
Fortify dummy span checking
2018-06-30 01:53:32 +03:00
Vadim Petrochenkov
99ecdb3f5f
hygiene: Implement transparent marks
2018-06-30 01:53:32 +03:00
bors
9f79d2f86a
Auto merge of #50997 - michaelwoerister:pre-analyze-filemaps, r=Mark-Simulacrum
...
Make FileMap::{lines, multibyte_chars, non_narrow_chars} non-mutable.
This PR removes most of the interior mutability from `FileMap`, which should be beneficial, especially in a multithreaded setting. This is achieved by initializing the state in question when the filemap is constructed instead of during lexing. Hopefully this doesn't degrade performance.
cc @wesleywiser
2018-06-28 11:20:41 +00:00
Michael Woerister
a1f8a6ce80
Fix FileMap::line_begin_pos().
...
The method relied on the FileMap still being under construction in
order for it to do what the name promises. It's now independent of
the current state.
2018-06-28 10:46:04 +02:00
Vadim Petrochenkov
d7072b5bb4
Fix rebase
2018-06-28 11:04:51 +03:00
Vadim Petrochenkov
f0622dfe5d
Use Idents for associated item definitions in HIR
...
Remove emulation of hygiene with gensyms
2018-06-28 11:04:50 +03:00
Vadim Petrochenkov
c5454c04bc
Use Idents for lifetimes in HIR
2018-06-28 11:04:50 +03:00
Michael Woerister
ba30c1dac9
syntax_pos: Store multibyte char size as u8 instead of u32.
2018-06-27 14:00:34 +02:00
Michael Woerister
ba1d18fe29
Add comments to analzye_filemap().
2018-06-27 14:00:34 +02:00
Michael Woerister
5a6dc8c4f5
Add SSE2 accelerated version of FileMap analysis.
2018-06-27 14:00:34 +02:00
Michael Woerister
3497138634
Use u32 instead of usize of encoding byte count of multi-byte chars.
2018-06-27 14:00:34 +02:00
Michael Woerister
257d279fe4
Make FileMap::{lines, multibyte_chars, non_narrow_chars} non-mutable.
2018-06-27 14:00:34 +02:00