about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2020-04-07Avoid extra &mut in Chain::fold and try_foldJosh Stone-2/+2
2020-04-07Reduce callsites in Chain::last()Josh Stone-11/+10
2020-04-07Reduce callsites in Chain::count()Josh Stone-6/+9
2020-04-07Implement Chain with Option fusesJosh Stone-149/+106
The iterators are now "fused" with `Option` so we don't need separate state to track which part is already exhausted, and we may also get niche layout for `None`. We don't use the real `Fuse` adapter because its specialization for `FusedIterator` unconditionally descends into the iterator, and that could be expensive to keep revisiting stuff like nested chains. It also hurts compiler performance to add more iterator layers to `Chain`.
2020-04-07Auto merge of #70837 - nnethercote:speed-up-find_library_crate, r=petrochenkovbors-21/+45
Speed up path searching with `find_library_crate`. By doing prefix and suffix checking on a `String` copy of each relevant `PathBuf`, rather than the `PathBuf` itself.
2020-04-07Auto merge of #70164 - eddyb:walk-generic-arg, r=nikomatsakisbors-603/+618
ty/walk: iterate `GenericArg`s instead of `Ty`s. Before this PR, `Ty::walk` only iterated over `Ty`s, but that's becoming an increasing problem with `const` generics, as `ty::Const`s in `Substs` are missed by it. By working with `GenericArg` instead, we can handle both `Ty`s and `ty::Const`s, but also `ty::Region`s, which used to require ad-hoc mechanisms such as `push_regions`. I've also removed `TraitRef::input_types`, as it's both long obsolete, and easy to misuse.
2020-04-07Speed up path searching with `find_library_crate`.Nicholas Nethercote-21/+45
By doing prefix and suffix checking on a `String` copy of each relevant `PathBuf`, rather than the `PathBuf` itself.
2020-04-07Rollup merge of #70859 - tmiasko:move-sanitize-inline-always, r=jonas-schievinkDylan DPC-2/+2
Move sanitize-inline-always test to sanitize directory
2020-04-07Rollup merge of #70839 - GuillaumeGomez:cleanup-e0506, r=Dylan-DPCDylan DPC-34/+26
clean up E0506 explanation r? @Dylan-DPC
2020-04-07Rollup merge of #70821 - rkuhn:expose_suggestions_InferCtxtExt, r=eddybDylan DPC-1/+2
expose suggestions::InferCtxtExt for clippy This is very useful to do good async/await diagnostic reporting, for example for https://github.com/rust-lang/rust-clippy/pull/5423.
2020-04-07Rollup merge of #70690 - GuillaumeGomez:cleanup-e0501, r=Dylan-DPCDylan DPC-9/+11
Clean up E0501 explanation r? @Dylan-DPC
2020-04-07Rollup merge of #70612 - Thomasdezeeuw:issue_70436, r=LukasKalbertodtDylan DPC-1/+169
Add io::Write::write_all_vectored Similar to io::Write::write_all but uses io::Write::write_vectored instead. Updates #70436 /cc @cramertj @sfackler
2020-04-07Put reference to write_vectored in quotes in docThomas de Zeeuw-1/+1
2020-04-06ty: remove `{Existential,}Trait{Ref,Predicate}::input_types`.Eduard-Mihai Burtescu-107/+103
2020-04-06ty: remove unnecessary `Predicate::walk_tys` and `collect_regions`.Eduard-Mihai Burtescu-103/+22
2020-04-06ty: switch `Ty::walk` from `Ty` to `GenericArg`.Eduard-Mihai Burtescu-232/+301
2020-04-06ty/walk: switch `walk_shallow` from `Ty` to `GenericArg`.Eduard-Mihai Burtescu-80/+58
2020-04-06traits/coherence: stop using `Ty::walk_shallow`.Eduard-Mihai Burtescu-21/+52
2020-04-06ty/walk: keep track of `GenericArg`s on the stack, instead of `Ty`s.Eduard-Mihai Burtescu-85/+107
2020-04-06Auto merge of #70573 - IgorPerikov:issue#70524_detailed_panic_messages, ↵bors-6/+55
r=LukasKalbertodt Detailed panic messages for Vec functions pass indexes to insert, remove, drain, and split_off panic messages closes #70524
2020-04-06Clean up E0501 explanationGuillaume Gomez-9/+11
2020-04-06Update src/librustc_trait_selection/traits/error_reporting/suggestions.rsRoland Kuhn-1/+1
Co-Authored-By: varkor <github@varkor.com>
2020-04-06add detailed panic messages for Vec functionsIgorPerikov-6/+55
2020-04-06Auto merge of #70737 - Centril:cleanup-lower-item-id, r=estebankbors-11/+2
cleanup `lower_item_id` r? @oli-obk
2020-04-06clean up E0506 explanationGuillaume Gomez-34/+26
2020-04-06Auto merge of #70771 - RalfJung:ctfe-loop, r=oli-obkbors-31/+63
Miri terminator handling: only do progress sanity check for 'Call' terminator This will still catch mistakes in bad intrinsic/foreign-item shims, which is the main source of errors here. Fixes https://github.com/rust-lang/rust/issues/70723 r? @oli-obk
2020-04-06Improve io::Write::write_all_vectored docsThomas de Zeeuw-11/+17
Also adds some more tests with different length IoSlices.
2020-04-06tweak rustc_layout debug outputRalf Jung-11/+11
2020-04-06Rollup merge of #70827 - estebank:shorten-sugg-span-add-lt, r=ecstatic-morseMazdak Farrokhzad-28/+17
Use smaller span for suggestion restricting lifetime
2020-04-06Rollup merge of #70739 - Centril:fix-70736, r=petrochenkovMazdak Farrokhzad-4/+88
def_collector, visit_fn: account for no body Fixes #70736 r? @petrochenkov
2020-04-06Rollup merge of #70713 - jsgf:rust-gdb-rustc, r=Mark-SimulacrumMazdak Farrokhzad-2/+18
Prefer sysroot from rustc in same directory as rust-gdb If there isn't a rustc in the same directory, then fall back to searching the path.
2020-04-06Rollup merge of #70704 - ↵Mazdak Farrokhzad-12/+3
danielframpton:aarch64-windows-panic-unwind-default, r=alexcrichton Make panic unwind the default for aarch64-*-windows-msvc targets With the llvm fixes from rust-lang/llvm-project#45 (included as a submodule change) we can enable unwinding by default for these targets. Fixes #65313 There are still a small number of test failures for which we can open individual issues. r? @alexcrichton
2020-04-06Rollup merge of #70519 - estebank:constraints-before-args-spans, r=CentrilMazdak Farrokhzad-61/+145
Tweak output of type params and constraints in the wrong order r? @Centril @varkor
2020-04-05Reduce the visual clutterEsteban Küber-56/+27
Using a single label for constraints and generic arguments.
2020-04-05review comments: use `partition_map`Esteban Küber-21/+13
2020-04-06Move sanitize-inline-always test to sanitize directoryTomasz Miąsko-2/+2
2020-04-05Use smaller span for suggestion restricting lifetimeEsteban Küber-28/+17
2020-04-06Rollup merge of #70824 - yoshuawuyts:fix-labels-in-std-macro-imports, ↵Mazdak Farrokhzad-14/+2
r=Mark-Simulacrum Remove marker comments in libstd/lib.rs macro imports These comments were probably moved around when rustfmt was introduced. They don't correctly denote what they were intended for, so I propose we remove them instead. Thanks!
2020-04-06Rollup merge of #70808 - hermitcore:tls, r=dtolnayMazdak Farrokhzad-44/+48
Simplify dtor registration for HermitCore by using a list of destructors The implementation is similar to the macOS version and doesn't depend on additional OS support
2020-04-06Rollup merge of #70798 - estebank:satisfy, r=CentrilMazdak Farrokhzad-23/+23
"cannot resolve" → "cannot satisfy" CC #66523 r? @Centril
2020-04-06Rollup merge of #70782 - faern:use-assoc-float-consts, r=dtolnayMazdak Farrokhzad-150/+34
Stop importing the float modules in documentation Follow up to #69860. I realized I had not searched for and fixed this for the float values. So with this PR they also use the associated constants instead of the module level constants. For the documentation where it also was using the `consts` submodule I opted to change it to import that directly. This becomes more in line with how other docs that use the `consts` submodule looks. And it also makes it so there are not two `f32` or `f64` things in the current namespace (both the module and the primitive type) and then hopefully confusing documentation readers less. r? @dtolnay
2020-04-06Rollup merge of #70750 - cuviper:direct-fuse, r=scottmcmMazdak Farrokhzad-74/+63
Match options directly in the Fuse implementation Rather than using `as_ref()`, `as_mut()`, and `?`, we can use `match` directly to save a lot of generated code. This was mentioned as a possibility in https://github.com/rust-lang/rust/pull/70366#issuecomment-603462546, and I found that it had a very large impact on #70332 using `Fuse` within `Chain`. Let's evaluate this change on its own first.
2020-04-06Rollup merge of #70665 - petrochenkov:linkargs, r=nagisaMazdak Farrokhzad-22/+38
Do not lose or reorder user-provided linker arguments Linker arguments are potentially order-dependent, so the order in which `-C link-arg` and `-C link-args` options are passed to `rustc` should be preserved when they are passed further to the linker. Also, multiple `-C link-args` options are now appended to each other rather than overwrite each other. In other words, `-C link-arg=a -C link-args="b c" -C link-args="d e" -C link-arg=f` is now passed as `"a" "b" "c" "d" "e" "f"` and not as `"d" "e" "a" "f"`. Addresses https://github.com/rust-lang/rust/pull/70505#issuecomment-606780163.
2020-04-06Rollup merge of #70553 - hermitcore:abi, r=dtolnayMazdak Farrokhzad-34/+4
move OS constants to platform crate to reduce platform specific constants move O_RDONLY etc. and the definition of thread priorities to hermit-abi
2020-04-05Remove labels in libstd/lib.rs macro importsYoshua Wuyts-14/+2
These labels were probably moved around when rustfmt was introduced.
2020-04-05Auto merge of #70816 - Dylan-DPC:rollup-kzcs8px, r=Dylan-DPCbors-158/+164
Rollup of 5 pull requests Successful merges: - #67797 (Query-ify Instance::resolve) - #70777 (Don't import integer and float modules, use assoc consts) - #70795 (Keep track of position when deleting from a BTreeMap) - #70812 (Do not use "nil" to refer to `()`) - #70815 (Enable layout debugging for `impl Trait` type aliases) Failed merges: r? @ghost
2020-04-05make set_span public, as all the fields it touches are public alreadyRalf Jung-1/+1
2020-04-05set span more accurately during const_propRalf Jung-7/+13
2020-04-05Miri engine: use span_bug in a few placesRalf Jung-20/+32
2020-04-05expose suggestions::InferCtxtExt for clippyRoland Kuhn-1/+2