summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2017-05-02Rollup merge of #41693 - est31:anon_params_removal, r=eddybCorey Farwell-1/+1
Removal pass for anonymous parameters Removes occurences of anonymous parameters from the rustc codebase, as they are to be deprecated. See issue #41686 and RFC 1685. r? @frewsxcv
2017-05-02Removal pass for anonymous parametersest31-1/+1
Removes occurences of anonymous parameters from the rustc codebase, as they are to be deprecated. See issue #41686 and RFC 1685.
2017-05-02Auto merge of #40851 - oli-obk:multisugg, r=jonathandturnerbors-12/+19
Minimize single span suggestions into a label changes ``` 14 | println!("☃{}", tup[0]); | ^^^^^^ | help: to access tuple elements, use tuple indexing syntax as shown | println!("☃{}", tup.0); ``` into ``` 14 | println!("☃{}", tup[0]); | ^^^^^^ to access tuple elements, use `tup.0` ``` Also makes suggestions explicit in the backend in preparation of adding multiple suggestions to a single diagnostic. Currently that's already possible, but results in a full help message + modified code snippet per suggestion, and has no rate limit (might show 100+ suggestions).
2017-05-01Increase macro recursion limit to 1024 Fixes #22552Charlie Sheridan-1/+1
2017-05-01Add profiling support, through the rustc -Z profile flag.whitequark-0/+11
When -Z profile is passed, the GCDAProfiling LLVM pass is added to the pipeline, which uses debug information to instrument the IR. After compiling with -Z profile, the $(OUT_DIR)/$(CRATE_NAME).gcno file is created, containing initial profiling information. After running the program built, the $(OUT_DIR)/$(CRATE_NAME).gcda file is created, containing branch counters. The created *.gcno and *.gcda files can be processed using the "llvm-cov gcov" and "lcov" tools. The profiling data LLVM generates does not faithfully follow the GCC's format for *.gcno and *.gcda files, and so it will probably not work with other tools (such as gcov itself) that consume these files.
2017-04-28Auto merge of #41542 - petrochenkov:objpars2, r=nikomatsakisbors-2/+2
syntax: Parse trait object types starting with a lifetime bound Fixes https://github.com/rust-lang/rust/issues/39085 This was originally implemented in https://github.com/rust-lang/rust/pull/40043, then reverted, then there was some [agreement](https://github.com/rust-lang/rust/issues/39318#issuecomment-289108720) that it should be supported. (This is hopefully the last PR related to bound parsing.)
2017-04-28Auto merge of #41508 - michaelwoerister:generic-path-remapping, r=alexcrichtonbors-73/+112
Implement a file-path remapping feature in support of debuginfo and reproducible builds This PR adds the `-Zremap-path-prefix-from`/`-Zremap-path-prefix-to` commandline option pair and is a more general implementation of #41419. As opposed to the previous attempt, this implementation should enable reproducible builds regardless of the working directory of the compiler. This implementation of the feature is more general in the sense that the re-mapping will affect *all* paths the compiler emits, including the ones in error messages. r? @alexcrichton
2017-04-27Auto merge of #37860 - giannicic:defaultimpl, r=nagisabors-13/+54
#37653 support `default impl` for specialization this commit implements the first step of the `default impl` feature: > all items in a `default impl` are (implicitly) `default` and hence > specializable. In order to test this feature I've copied all the tests provided for the `default` method implementation (in run-pass/specialization and compile-fail/specialization directories) and moved the `default` keyword from the item to the impl. See [referenced](https://github.com/rust-lang/rust/issues/37653) issue for further info r? @aturon
2017-04-26 support `default impl` for specializationGianni Ciccarelli-16/+10
`[default] [unsafe] impl` and typecheck
2017-04-26Implement a file-path remapping feature in support of debuginfo and ↵Michael Woerister-73/+112
reproducible builds.
2017-04-25Parse trait object types starting with a lifetime boundVadim Petrochenkov-2/+2
2017-04-25Add ui testsGuillaume Gomez-7/+4
2017-04-25Improve E0178 suggestion placementOliver Schneider-4/+5
2017-04-25Address PR commentsOliver Schneider-3/+1
2017-04-25Update affected testsOliver Schneider-3/+1
2017-04-25Minimize single span suggestions into a noteOliver Schneider-2/+12
2017-04-25 support `default impl` for specializationGianni Ciccarelli-3/+11
pr review
2017-04-24Remove strip prefixGuillaume Gomez-16/+2
2017-04-24Add tests for module suggestionsGuillaume Gomez-15/+28
2017-04-24Fix invalid module suggestionGuillaume Gomez-13/+20
2017-04-24support `default impl` for specializationGianni Ciccarelli-13/+52
this commit implements the first step of the `default impl` feature: all items in a `default impl` are (implicitly) `default` and hence specializable. In order to test this feature I've copied all the tests provided for the `default` method implementation (in run-pass/specialization and compile-fail/specialization directories) and moved the `default` keyword from the item to the impl. See referenced issue for further info
2017-04-24Fix more merge conflictsMatthew-37/+64
2017-04-22Resolve merge conflictmatthewjasper-56/+116
2017-04-22Auto merge of #41464 - frewsxcv:rollup, r=frewsxcvbors-37/+64
Rollup of 3 pull requests - Successful merges: #41077, #41355, #41450 - Failed merges:
2017-04-22Rollup merge of #41077 - petrochenkov:boundparen, r=nikomatsakisCorey Farwell-37/+64
syntax: Support parentheses around trait bounds An implementation for https://github.com/rust-lang/rust/issues/39318#issuecomment-290956826 r? @nikomatsakis
2017-04-22Auto merge of #39999 - bitshifter:struct_align, r=eddybbors-7/+58
Implementation of repr struct alignment RFC 1358. The main changes around rustc::ty::Layout::struct: * Added abi_align field which stores abi alignment before repr align is applied * align field contains transitive repr alignment * Added padding vec which stores padding required after fields The main user of this information is rustc_trans::adt::struct_llfields which determines the LLVM fields to be used by LLVM, including padding fields. A possible future optimisation would be to put the padding Vec in an Option, since it will be unused unless you are using repr align.
2017-04-21Rollup merge of #41432 - abonander:issue_41211, r=jseyfriedCorey Farwell-2/+12
Don't panic if an attribute macro fails to resolve at crate root Adds temporary regression test; this ideally should work as-is (#41430) Closes #41211 r? @jseyfried
2017-04-21Move parse_remaining_bounds into a separate functionVadim Petrochenkov-20/+21
2017-04-21Fix issue with single question mark or parenVadim Petrochenkov-23/+28
2017-04-21syntax: Support parentheses around trait boundsVadim Petrochenkov-4/+25
2017-04-20Reduce visual clutter of multiline start when possibleEsteban Küber-47/+46
When a span starts on a line with nothing but whitespace to the left, and there are no other annotations in that line, simplify the visual representation of the span. Go from: ```rust error[E0072]: recursive type `A` has infinite size --> file2.rs:1:1 | 1 | struct A { | _^ starting here... 2 | | a: A, 3 | | } | |_^ ...ending here: recursive type has infinite size | ``` To: ```rust error[E0072]: recursive type `A` has infinite size --> file2.rs:1:1 | 1 | / struct A { 2 | | a: A, 3 | | } | |_^ recursive type has infinite size ``` Remove `starting here...`/`...ending here` labels from all multiline diagnostics.
2017-04-20Don't panic if an attribute macro fails to resolve at crate rootAustin Bonander-2/+12
Adds temporary regression test; this ideally should work as-is (#41430) Closes #41211
2017-04-21Added feature gate, updated error messages and tests.Cameron Hart-5/+18
2017-04-21Implementation of repr struct alignment RFC 1358.Cameron Hart-7/+45
The main changes around rustc::ty::Layout::struct and rustc_trans:adt: * Added primitive_align field which stores alignment before repr align * Always emit field padding when generating the LLVM struct fields * Added methods for adjusting field indexes from the layout index to the LLVM struct field index The main user of this information is rustc_trans::adt::struct_llfields which determines the LLVM fields to be used by LLVM, including padding fields.
2017-04-20Stabilize RFC 1506 - clarified ADT kindsMatthew-25/+3
2017-04-20Rollup merge of #41214 - estebank:less-multiline, r=petrochenkovCorey Farwell-0/+19
Add a way to get shorter spans until `char` for pointing at defs ```rust error[E0072]: recursive type `X` has infinite size --> file.rs:10:1 | 10 | struct X { | ^^^^^^^^ recursive type has infinite size | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `X` representable ``` vs ```rust error[E0072]: recursive type `X` has infinite size --> file.rs:10:1 | 10 | struct X { | _^ starting here... 11 | | x: X, 12 | | } | |_^ ...ending here: recursive type has infinite size | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `X` representable ``` Re: #35965, #38246. Follow up to #38328. r? @jonathandturner
2017-04-18Add top level sections to the Unstable Book.Corey Farwell-3/+0
Prior to this commit, the contents of the Unstable Book were assumed to be unstable features. This commit moves features into 'language features' or 'library features' subsections. It also moves the 'linker_flavor' compiler flag into a new 'Compiler Flags' subsection. Even though it was helpful, I removed the tidy check that cross-references the SUMMARY.md links with the Unstable Book directory contents just because it would be difficult to maintain. Relevant PR: https://github.com/rust-lang/rust/issues/41142.
2017-04-17Auto merge of #41282 - arielb1:missing-impl-item, r=petrochenkovbors-70/+101
libsyntax/parse: fix missing kind error reporting Fixes #41161. Fixes #41239.
2017-04-17libsyntax/parse: improve associated item error reportingAriel Ben-Yehuda-70/+101
Fixes #41161. Fixes #41239.
2017-04-17Auto merge of #41345 - frewsxcv:rollup, r=frewsxcvbors-30/+82
Rollup of 3 pull requests - Successful merges: #41012, #41280, #41290 - Failed merges:
2017-04-17Auto merge of #41264 - alexeyzab:41158-fix-docs, r=steveklabnikbors-2/+2
Fix old docs Fixes #41158
2017-04-17Adjust descriptionalexey zabelin-1/+1
2017-04-15satisfy completely useless tidy checkAlex Burka-1/+1
2017-04-15feature gate :vis matcherAlex Burka-22/+51
2017-04-15widen :vis follow setAlex Burka-4/+4
2017-04-15move NtVis enum variant to stave off comment rotAlex Burka-1/+1
2017-04-15parse interpolated visibility tokensAlex Burka-1/+4
2017-04-15update print_visibility for new pub(restricted) syntaxAlex Burka-8/+6
2017-04-15update :vis implementation to current rustAlex Burka-7/+7
2017-04-15Implementation of the `vis` macro matcher.Daniel Keep-1/+23