about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2018-07-20Auto merge of #52574 - kennytm:rollup, r=kennytmbors-61/+73
Rollup of 7 pull requests Successful merges: - #52502 (fix unsafety: don't call ptr_rotate for ZST) - #52505 (rustc: Remove a workaround in ThinLTO fixed upstream) - #52526 (Enable run-pass/sepcomp-lib-lto.rs on Android) - #52527 (Remove duplicate E0396 tests) - #52539 (rustc: Fix two custom attributes with custom derive) - #52540 (Fix docker/run.sh script when run locally) - #52573 (Cleanups) Failed merges: r? @ghost
2018-07-21Rollup merge of #52573 - oli-obk:cleanups, r=RalfJungkennytm-19/+8
Cleanups r? @RalfJung
2018-07-21Rollup merge of #52540 - alexcrichton:tweak-script, r=kennytmkennytm-1/+1
Fix docker/run.sh script when run locally Switch a `mkdir $foo` to `mkdir -p $foo` to handle the case that this script is being run locally and has previously executed.
2018-07-21Rollup merge of #52539 - alexcrichton:two-attrs, r=petrochenkovkennytm-0/+63
rustc: Fix two custom attributes with custom derive This commit fixes an issue where multiple custom attributes could not be fed into a custom derive in some situations with the `use_extern_macros` feature enabled. The problem was that the macro expander didn't consider that it was making progress when we were deducing that attributes should be lumped in with custom derive invocations. The fix applied here was to track in the expander if our attribute is changing (getting stashed away elsewhere and replaced with a new invocation). If it is swapped then it's considered progress, otherwise behavior should remain the same. Closes #52525
2018-07-21Rollup merge of #52527 - ljedrz:cleanup_13973, r=oli-obkkennytm-10/+0
Remove duplicate E0396 tests Resolves FIXME #13973 (erroneously marked as #13972). A test for E0396 already exists in `test/ui/const-deref-ptr.rs`.
2018-07-21Rollup merge of #52526 - ljedrz:cleanup_18800, r=alexcrichtonkennytm-1/+0
Enable run-pass/sepcomp-lib-lto.rs on Android #18800 is fixed, so it should be safe to restore this test.
2018-07-21Rollup merge of #52505 - alexcrichton:remove-thinlto-hack, r=nikomatsakiskennytm-29/+0
rustc: Remove a workaround in ThinLTO fixed upstream This commit removes a hack in our ThinLTO passes which removes available externally functions manually. The [upstream bug][1] has long since been fixed, so we should be able to rely on LLVM natively for this now! [1]: https://bugs.llvm.org/show_bug.cgi?id=35736
2018-07-21Rollup merge of #52502 - RalfJung:rotate, r=scottmcmkennytm-1/+1
fix unsafety: don't call ptr_rotate for ZST `rotate::ptr_rotate` has a comment saying ``` /// # Safety /// /// The specified range must be valid for reading and writing. /// The type `T` must have non-zero size. ``` So we better make sure we don't call it on ZST... Cc @scottmcm (author of https://github.com/rust-lang/rust/pull/41670)
2018-07-20Auto merge of #52354 - QuietMisdreavus:rustdoc-lints, r=GuillaumeGomezbors-5/+5
stabilize lint handling in rustdoc When https://github.com/rust-lang/rust/pull/51732 added CLI flags to manipulate lints in rustdoc, they were added as unstable flags. This made sense as they were new additions, but since they mirrored the flags that rustc has, it's worth considering them to not need an unstable period. Stabilizing them also provides the opportunity for a critical fix: allowing Cargo to pass `--cap-lints allow` when documenting dependencies, the same as when it compiles them. r? @rust-lang/rustdoc
2018-07-20Remove unused methodOliver Schneider-18/+1
2018-07-20Only methods are fn-like, not other associated itemsOliver Schneider-1/+7
2018-07-20Auto merge of #52498 - oli-obk:const_prop, r=nikomatsakisbors-148/+207
Const propagate casts fixes #49760 So... This fixes the original issue about the missing warnings. But our test suite contains fun things like ```rust fn foo() {} assert_eq!(foo as i16, foo as usize as i16); ``` Which, will result in > a raw memory access tried to access part of a pointer value as raw bytes on both sides of the assertion. Because well... that's exactly what's going on! We're ripping out 16 bits of a pointer.
2018-07-20Auto merge of #52476 - wesleywiser:categorize_queries, r=nikomatsakisbors-453/+563
Categorize queries for later self-profiling Change the define_queries! macro per feedback on #51657. Big thanks to @mark-i-m for the help getting the macro changes correct! I'm pulling this commit out of the other PR because it's hard to keep up-to-date as queries are added or changed. r? @nikomatsakis
2018-07-20Auto merge of #52467 - alexcrichton:lints-and-macros, r=Manishearthbors-1/+125
Squash all lints tied to foreign macros by default This PR is a continuation of https://github.com/rust-lang/rust/pull/49755 (thanks for the initial jump-start @Dylan-DPC!) and is targeted at solving https://github.com/rust-lang/rust/issues/48855. This change updates the lint infrastructure to, by default, ignore all lints emitted for code that originates in a foreign macro. For example if `println!("...")` injects some idiomatic warnings these are all ignored by default. The rationale here is that for almost all lints there's no action that can be taken if the code originates from a foreign lint. Closes #48855 Closes #52483 Closes #52479
2018-07-20Remove duplicate E0396 testsljedrz-10/+0
2018-07-20Auto merge of #52445 - alexcrichton:wasm-import-module, r=eddybbors-160/+165
rustc: Stabilize #[wasm_import_module] as #[link(...)] This commit stabilizes the `#[wasm_import_module]` attribute as `#[link(wasm_import_module = "...")]`. Tracked by #52090 this new directive in the `#[link]` attribute is used to configured the module name that the imports are listed with. The WebAssembly specification indicates two utf-8 names are associated with all imported items, one for the module the item comes from and one for the item itself. The item itself is configurable in Rust via its identifier or `#[link_name = "..."]`, but the module name was previously not configurable and defaulted to `"env"`. This commit ensures that this is also configurable. Closes #52090
2018-07-20Auto merge of #52349 - RalfJung:once, r=alexcrichtonbors-2/+10
sync::Once use release-acquire access modes Nothing here makes a case distinction like "this happened before OR after that". All we need is to get happens-before edges whenever we see that the state/signal has been changed. Release-acquire is good enough for that.
2018-07-19Auto merge of #52024 - oli-obk:existential_parse, r=nikomatsakisbors-146/+2028
Implement existential types (not for associated types yet) r? @nikomatsakis cc @Centril @varkor @alexreg
2018-07-19Auto merge of #51854 - davidtwco:rfc-2008-rustdoc, r=QuietMisdreavusbors-10/+81
RFC 2008 non-exhaustive enums/structs: Rustdoc Part of #44109. Not sure how those who maintain rustdoc primarily would prefer this addition look or where it should be placed, happy to make any changes required. r? @QuietMisdreavus (not sure if this is the right person, just guessing)
2018-07-19Generate a page for existential typesOliver Schneider-4/+37
2018-07-19Updated FRU terminology.David Wood-1/+1
2018-07-19Fix docker/run.sh script when run locallyAlex Crichton-1/+1
Switch a `mkdir $foo` to `mkdir -p $foo` to handle the case that this script is being run locally and has previously executed.
2018-07-19rustc: Fix two custom attributes with custom deriveAlex Crichton-0/+63
This commit fixes an issue where multiple custom attributes could not be fed into a custom derive in some situations with the `use_extern_macros` feature enabled. The problem was that the macro expander didn't consider that it was making progress when we were deducing that attributes should be lumped in with custom derive invocations. The fix applied here was to track in the expander if our attribute is changing (getting stashed away elsewhere and replaced with a new invocation). If it is swapped then it's considered progress, otherwise behavior should remain the same. Closes #52525
2018-07-19Auto merge of #52197 - euclio:exit-code, r=oli-obkbors-25/+110
overhaul exit codes for rustc and rustdoc This commit changes the exit status of rustc to 1 in the presence of compilation errors. In the event of an unexpected panic (ICE) the standard panic error exit status of 101 remains. A run-make test is added to ensure that the exit code does not regress, and compiletest is updated to check for an exit status of 1 or 101, depending on the mode and suite. This is a breaking change for custom drivers. Note that while changes were made to the rustdoc binary, there is no intended behavior change. rustdoc errors (i.e., failed lints) will still report 101. While this could *also* hide potential ICEs, I will leave that work to a future PR. Fixes #51971.
2018-07-19Auto merge of #52515 - Manishearth:clippyup, r=kennytmbors-8/+5
Update clippy Silences the warnings for now, will fix those over time.
2018-07-19Enable run-pass/sepcomp-lib-lto.rs on Androidljedrz-1/+0
2018-07-19fix safety-related comment in slice::rotateRalf Jung-1/+1
2018-07-18Update clippyManish Goregaokar-8/+5
2018-07-19Auto merge of #52429 - alexcrichton:update-cargo, r=Mark-Simulacrumbors-171/+185
Update Cargo and stdsimd submodules Update Cargo to bring in some bug fixes and such, and update `stdsimd` to... Closes #52403
2018-07-19Auto merge of #52486 - kennytm:rollup, r=kennytmbors-42/+153
Rollup of 13 pull requests Successful merges: - #51628 (use checked write in `LineWriter` example) - #52116 (Handle array manually in str case conversion methods) - #52218 (Amend option.take examples) - #52418 (Do not use desugared ident when suggesting adding a type) - #52439 (Revert some changes from #51917 to fix custom libdir) - #52455 (Fix doc comment: use `?` instead of `.unwrap()`) - #52458 (rustc: Fix a suggestion for the `proc_macro` feature) - #52464 (Allow clippy to be installed with make install) - #52472 (rustc: Enable `use_extern_macros` in 2018 edition) - #52477 (Clarify short-circuiting behvaior of Iterator::zip.) - #52480 (Cleanup #24958) - #52487 (Don't build twice the sanitizers on Linux) - #52510 (rustdoc: remove FIXME about macro redirects) Failed merges: r? @ghost
2018-07-18Update Cargo submoduleAlex Crichton-171/+185
2018-07-18Auto merge of #52431 - semarie:compiler-builtins, r=alexcrichtonbors-0/+0
update compiler-builtins for openbsd import rust-lang-nursery/compiler-builtins/pull/249 in rust main line. it solves an issue on OpenBSD with building of `librsvg`.
2018-07-19Rollup merge of #52510 - QuietMisdreavus:redirects-are-cool, r=nrckennytm-1/+0
rustdoc: remove FIXME about macro redirects Based on the discussion in #35705, the rustdoc team has determined that macro redirects are here to stay. Closes #35705
2018-07-19Rollup merge of #52418 - estebank:desugaring-type, r=nikomatsakiskennytm-3/+57
Do not use desugared ident when suggesting adding a type Re #51116.
2018-07-18remove FIXME about macro redirectsQuietMisdreavus-1/+0
Based on the discussion in #35705, the rustdoc team has determined that macro redirects are here to stay. Closes #35705
2018-07-18Updated wording and placement of non-exhaustive notice so it is collapsed by ↵David Wood-18/+37
default and easier to understand.
2018-07-18rustc: Remove a workaroudn in ThinLTO fixed upstreamAlex Crichton-29/+0
This commit removes a hack in our ThinLTO passes which removes available externally functions manually. The [upstream bug][1] has long since been fixed, so we should be able to rely on LLVM natively for this now! [1]: https://bugs.llvm.org/show_bug.cgi?id=35736
2018-07-18update compiler-builtins for openbsdSébastien Marie-0/+0
2018-07-18Update test outputEsteban Küber-1/+1
2018-07-18Change label span to point at iterator instead of iter itemEsteban Küber-13/+19
2018-07-18Do not use desugared ident when suggesting adding a typeEsteban Küber-2/+50
2018-07-19Rollup merge of #52480 - ljedrz:cleanup_24958, r=oli-obkkennytm-3/+0
Cleanup #24958 Since #24958 was closed we might want to remove the workarounds it introduced for android, arm and aarch64.
2018-07-19Rollup merge of #51628 - euclio:line-writer, r=frewsxcvkennytm-10/+23
use checked write in `LineWriter` example The example was wrong because it didn't check the return value of `write()`, and it didn't flush the buffer before comparing the contents of the file. Fixes #51621.
2018-07-19Rollup merge of #52487 - alexcrichton:build-less-sanitizers, r=kennytmkennytm-15/+28
Don't build twice the sanitizers on Linux This commit is an attempted fix at #50887. It was noticed that on that issue we're building both x86_64 and i386 versions of libraries, but we only actually need the x86_64 versions! This hopes that the build race condition exhibited in #50887 is connected to building both architectures and/or building a lot of libraries, so this should help us build precisely what we need and no more.
2018-07-18Const-propagate castsOliver Schneider-15/+61
2018-07-18Auto merge of #52375 - oli-obk:the_early_lint_pass_gets_the_worm, r=Manishearthbors-183/+599
Lint `async` identifiers in 2018 preparation mode r? @Manishearth fixes https://github.com/rust-lang/rust/issues/49716
2018-07-18rustc: Stabilize #[wasm_import_module] as #[link(...)]Alex Crichton-160/+165
This commit stabilizes the `#[wasm_import_module]` attribute as `#[link(wasm_import_module = "...")]`. Tracked by #52090 this new directive in the `#[link]` attribute is used to configured the module name that the imports are listed with. The WebAssembly specification indicates two utf-8 names are associated with all imported items, one for the module the item comes from and one for the item itself. The item itself is configurable in Rust via its identifier or `#[link_name = "..."]`, but the module name was previously not configurable and defaulted to `"env"`. This commit ensures that this is also configurable. Closes #52090
2018-07-18Don't build twice the sanitizers on LinuxAlex Crichton-15/+28
This commit is an attempted fix at #50887. It was noticed that on that issue we're building both x86_64 and i386 versions of libraries, but we only actually need the x86_64 versions! This hopes that the build race condition exhibited in #50887 is connected to building both architectures and/or building a lot of libraries, so this should help us build precisely what we need and no more.
2018-07-18Rollup merge of #52477 - frewsxcv:frewsxcv-iter-short, r=alexcrichtonkennytm-1/+3
Clarify short-circuiting behvaior of Iterator::zip. Fixes https://github.com/rust-lang/rust/issues/52279.
2018-07-18Rollup merge of #52472 - alexcrichton:macros-edition-2018, r=petrochenkovkennytm-1/+1
rustc: Enable `use_extern_macros` in 2018 edition This was previously enabled via `proc_macro`, but since `proc_macro` is now stable this is no longer the case. Explicitly include it in the 2018 edition here.