about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2018-05-01Don’t eliminate frame pointers on apple by defaultSimonas Kazlauskas-0/+2
2018-05-01Rework force-frame-pointerSimonas Kazlauskas-6/+9
This reworks the force-frame-pointer PR to explicitly only consider the value of the flag if it is provided, and use a target default otherwise. Something that was tried but not kept was renaming the flag to `frame-pointer`, because for flag `frame-pointer=no`, there is no guarante, that LLVM will elide *all* the frame pointers; oposite of what the literal reading of the flag would suggest.
2018-05-01Don't force-enable frame pointers when generating debug infoBjörn Steinbrink-3/+23
We apparently used to generate bad/incomplete debug info causing debuggers not to find symbols of stack allocated variables. This was somehow worked around by having frame pointers. With the current codegen, this seems no longer necessary, so we can remove the code that force-enables frame pointers whenever debug info is requested. Since certain situations, like profiling code profit from having frame pointers, we add a -Cforce-frame-pointers flag to always enable frame pointers. Fixes #11906
2018-05-01Auto merge of #50197 - nikomatsakis:skolemize-out-of-tcx, r=eddybbors-35/+36
move skolemized regions into global tcx Experimental branch to move skolemized regions into global tcx. This is probably not what we want long term but may be convenient to unblock @sgrif in the short term. I'd like to do a perf run, though the main concern I guess would be memory usage. r? @eddyb
2018-04-30Auto merge of #48925 - zackmdavis:fn_must_stabilize, r=nikomatsakisbors-337/+167
stabilize `#[must_use]` for functions and must-use comparison operators (RFC 1940) r? @nikomatsakis
2018-04-30put ReSkolemized into the global tcxNiko Matsakis-8/+13
2018-04-30make needs_infer specific to inference variablesNiko Matsakis-11/+23
Notably, excluding ReSkolemized
2018-04-30remove some (apparently) dead codeNiko Matsakis-16/+0
2018-04-30Auto merge of #50345 - kennytm:rollup, r=kennytmbors-56/+276
Rollup of 7 pull requests Successful merges: - #50233 (Make `Vec::new` a `const fn`) - #50312 (Add more links in panic docs) - #50316 (Fix some broken links in docs.) - #50325 (Add a few more tests for proc macro feature gating) - #50327 (Display correct unused field suggestion for nested struct patterns) - #50330 (check that #[used] is used only on statics) - #50344 (Update Cargo to 2018-04-28 122fd5be5201913d42e219e132d6569493583bca) Failed merges:
2018-05-01Rollup merge of #50344 - SimonSapin:cargo, r=alexcrichtonkennytm-0/+0
Update Cargo to 2018-04-28 122fd5be5201913d42e219e132d6569493583bca
2018-05-01Rollup merge of #50330 - japaric:used, r=nagisakennytm-0/+40
check that #[used] is used only on statics this attribute has no effect on other items. This makes the implementation match what's described in the RFC. cc #40289 r? @nagisa
2018-05-01Rollup merge of #50327 - varkor:match-unused-struct-field, r=estebankkennytm-15/+120
Display correct unused field suggestion for nested struct patterns Extends https://github.com/rust-lang/rust/pull/47922 by checking more sophisticated patterns (e.g. references, slices, etc.). Before: ``` warning: unused variable: `bar` --> src/main.rs:37:21 | 37 | &Foo::Bar { bar } => true, | ^^^ help: consider using `_bar` instead | = note: #[warn(unused_variables)] on by default ``` After: ``` warning: unused variable: `bar` --> src/main.rs:37:21 | 37 | &Foo::Bar { bar } => true, | ^^^ help: try ignoring the field: `bar: _` | = note: #[warn(unused_variables)] on by default ``` Fixes #50303. r? @estebank
2018-05-01Rollup merge of #50325 - petrochenkov:pmgate, r=alexcrichtonkennytm-13/+42
Add a few more tests for proc macro feature gating
2018-05-01Rollup merge of #50316 - ehuss:fix-doc-links, r=frewsxcvkennytm-1/+6
Fix some broken links in docs.
2018-05-01Rollup merge of #50312 - Pazzaz:master, r=GuillaumeGomezkennytm-19/+40
Add more links in panic docs Fixes #48695 by adding a link to `AssertUnwindSafe`. Also added some other links in the module's docs to make things clearer.
2018-05-01Rollup merge of #50233 - mark-i-m:const_vec, r=kennytmkennytm-8/+28
Make `Vec::new` a `const fn` `RawVec::empty/_in` are a hack. They're there because `if size_of::<T> == 0 { !0 } else { 0 }` is not allowed in `const` yet. However, because `RawVec` is unstable, the `empty/empty_in` constructors can be removed when #49146 is done...
2018-04-30Auto merge of #50163 - kornelski:error, r=Kimundibors-39/+26
Bury Error::description() Second attempt of #49536 https://github.com/rust-lang/rfcs/pull/2230 The exact wording of the default implementation is still up in the air, but I think it's a detail that can be amended later.
2018-04-30Update Cargo to 2018-04-28 122fd5be5201913d42e219e132d6569493583bcaSimon Sapin-0/+0
2018-04-30Auto merge of #50326 - ollie27:rustdoc_cross_crate_const_link, r=GuillaumeGomezbors-0/+104
rustdoc: Fix links to constants in external crates r? @GuillaumeGomez
2018-04-30Auto merge of #50272 - scottmcm:termination-test-error, r=nikomatsakisbors-0/+34
Add a ui test for an incorrect Result success type in a #[test] cc https://github.com/rust-lang/rust/issues/48854#issuecomment-384730601 r? @nikomatsakis
2018-04-30check that #[used] is used only on staticsJorge Aparicio-0/+40
2018-04-30Auto merge of #50204 - Manishearth:approx-enum, r=estebankbors-31/+45
Use enum for approximate suggestions r? @nrc @killercup
2018-04-30Auto merge of #50261 - nrc:update, r=kennytmbors-17/+5
Update Rustfmt r? @kennytm Updates rustfmt, should fix the broken tests, but I can't reproduce locally, so who knows?
2018-04-30Update RustfmtNick Cameron-17/+5
2018-04-30Correct unused field warning on struct match container patternsvarkor-13/+77
2018-04-30Auto merge of #50092 - abonander:issue-49934, r=petrochenkovbors-16/+184
Warn on pointless #[derive] in more places This fixes the regression in #49934 and ensures that unused `#[derive]` invocations on statements, expressions and generic type parameters survive to trip the `unused_attributes` lint. There is a separate warning hardcoded for `#[derive]` on macro invocations since linting (even the early-lint pass) occurs after expansion. This also adds regression tests for some nodes that were already warning properly. closes #49934
2018-04-30Correct unused field warning on box struct matchvarkor-11/+24
2018-04-30Correct unused field warning on &struct matchvarkor-13/+41
2018-04-29Warn on pointless `#[derive]` in more placesAustin Bonander-16/+184
This fixes the regression in #49934 and ensures that unused `#[derive]`s on statements, expressions and generic type parameters survive to trip the `unused_attributes` lint. For `#[derive]` on macro invocations it has a hardcoded warning since linting occurs after expansion. This also adds regression testing for some nodes that were already warning properly. closes #49934
2018-04-29rustdoc: Fix links to constants in external cratesOliver Middleton-0/+104
2018-04-29heh, logic is hardMark Mansi-1/+1
2018-04-30Add a few more tests for proc macro feature gatingVadim Petrochenkov-13/+42
2018-04-29use const trickMark Mansi-24/+7
2018-04-29Auto merge of #50317 - varkor:repr-align-assign, r=nagisabors-0/+57
Improve error message for #[repr(align=x)] Before: ``` error[E0552]: unrecognized representation hint --> src/main.rs:1:8 | 1 | #[repr(align="8")] | ^^^^^^^^^ ``` After: ``` error[E0693]: incorrect `repr(align)` attribute format --> src/main.rs:1:8 | 2 | #[repr(align="8")] | ^^^^^^^^^ help: use parentheses instead: `align(8)` ``` Fixes #50314.
2018-04-29Add test for repr(align=x)varkor-0/+32
2018-04-29Add error when using repr(align=x) instead of repr(align(x))varkor-0/+25
2018-04-29Fix some broken links in docs.Eric Huss-1/+6
2018-04-29Auto merge of #48605 - KiChjang:unused-mut-warning, r=nikomatsakisbors-119/+414
Allow MIR borrowck to catch unused mutable locals Fixes #47279. r? @nikomatsakis
2018-04-29Auto merge of #50217 - z4v1er:patch-1, r=aturonbors-1/+0
Fix typo
2018-04-29Auto merge of #50300 - phansch:update_clippy, r=oli-obkbors-18/+16
Update clippy First time doing this. Not sure if this is enough as the docs mention that the Cargo.lock should be updated, however running `cargo update -p clippy` and `./x.py` doesn't change anything. Closes https://github.com/rust-lang-nursery/rust-clippy/issues/2700 r? @oli-obk
2018-04-29Add more links in panic docsPazzaz-19/+40
2018-04-29Auto merge of #50306 - alexcrichton:inline-policy, r=sfacklerbors-0/+1
std: Inline `DefaultResizePolicy::new` This should allow us to tighten up the [codegen][example] a bit more, avoiding a function call across object boundaries in the default optimized case. [example]: https://play.rust-lang.org/?gist=c1179088b0f8a4dcd93a9906463f993d&version=stable&mode=release
2018-04-28Add the actual used mutable var to the setKeith Yeung-65/+102
2018-04-28Return RootPlace in is_mutableNiko Matsakis-7/+35
2018-04-28stabilize `#[must_use]` for functions and must-use operatorsZack M. Davis-342/+166
This is in the matter of RFC 1940 and tracking issue #43302.
2018-04-28in which the fn-must-use codepath is prevented from panicking on closureZack M. Davis-1/+7
The must-use lint needs the DefId of called functions and method receivers in order to look for a `#[must_use]` attribute, but this would ICE (!) if a called function was actually a closure (with a non-unit return value). Instead, let's be specific that we want a `Def::Fn`, rather than blithely assuming that we can get the DefId of a qpath. Supporting must-use closures doesn't seem like a priority, but could conceivably be added in the future if desired (conditional on the statement and expression attributes (#15701) story being amicable).
2018-04-29Auto merge of #50271 - sinkuu:fix_ice, r=eddybbors-1/+40
Fix ICE #48984 * ~~fbf6423 The tail type was not normalized.~~ * https://github.com/rust-lang/rust/commit/d0839d5680d2a51785eeb0811cf3e2beba90eacb The method had a wrong assumption that something whose parent is a trait is an associated item. Fixes #48984.
2018-04-28feature on testMark Mansi-0/+2
2018-04-28Auto merge of #50188 - alexcrichton:feature-all-the-things, r=eddybbors-33/+47
Add `-C target-feature` to all functions Previously the features specified to LLVM via `-C target-feature` were only reflected in the `TargetMachine` but this change *also* reflects these and the base features inside each function itself. This change matches clang and... Closes rust-lang-nursery/stdsimd#427
2018-04-28Add `-C target-feature` to all functionsAlex Crichton-33/+47
Previously the features specified to LLVM via `-C target-feature` were only reflected in the `TargetMachine` but this change *also* reflects these and the base features inside each function itself. This change matches clang and... Closes rust-lang-nursery/stdsimd#427