8000 Rollup of 19 pull requests by Mark-Simulacrum · Pull Request #53775 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Rollup of 19 pull requests #53775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 44 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
931eb4c
Add one more example for Cow that shows how to keep Cow in a struct
kpp Aug 6, 2018
9a3a12e
Fix review notes
kpp Aug 15, 2018
34b65db
document effect of join on memory ordering
RalfJung Aug 15, 2018
5bfb785
Review fix
kpp Aug 15, 2018
b73843f
Force-inline `shallow_resolve` at its hottest call site.
nnethercote Aug 17, 2018
3995bff
Add another PartialEq example
GuillaumeGomez Aug 21, 2018
cccd2ce
cleanup: Add main functions to some UI tests
petrochenkov Aug 22, 2018
9395a02
Fix stabilisation version for macro_vis_matcher.
jkozlowski Aug 25, 2018
1f421d6
call span_suggestion with applicability
jcpst Aug 26, 2018
26f38c0
Do not suggest dereferencing in macro
estebank Aug 26, 2018
a2722f3
readd final newline
estebank Aug 27, 2018
4570ace
save-analysis: Differentiate foreign functions and statics.
emilio Aug 18, 2018
130e556
Avoid calling `unroll_place()` in a common case.
nnethercote Aug 27, 2018
c874e36
add llvm-readobj to llvm-tools-preview
japaric Aug 27, 2018
9e96419
Generalize `async_idents` to all new keywords
alexcrichton Aug 24, 2018
51fd3bf
rustc: Suggest removing `extern crate` in 2018
alexcrichton Aug 24, 2018
8486efa
fix a typo: taget_env -> target_env
oconnor663 Aug 27, 2018
1d79d8b
Fix source automatic scroll
GuillaumeGomez Aug 27, 2018
04b4c40
Fix invalid display of unstable messages
GuillaumeGomez Aug 27, 2018
f77ad5c
remove `let x = baz` which was obscuring the real error
nikomatsakis Aug 6, 2018
e6dcdee
expand keep-stage --help text
RalfJung Aug 28, 2018
31b63d0
split paragraph
RalfJung Aug 28, 2018
84796cb
sort
japaric Aug 28, 2018
93f3f5b
Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere i…
eddyb Aug 18, 2018
6628d39
move file-extension based .gitignore down to src/
RalfJung Aug 28, 2018
621d656
Rollup merge of #51760 - GuillaumeGomez:add-another-partialeq-example…
Mark-Simulacrum Aug 28, 2018
3fa6f01
Rollup merge of #53113 - kpp:more_docs_for_cow, r=GuillaumeGomez
Mark-Simulacrum Aug 28, 2018
40141cc
Rollup merge of #53129 - nikomatsakis:issue-51172-tweak-test, r=pnkfelix
Mark-Simulacrum Aug 28, 2018
c71e7ae
Rollup merge of #53389 - RalfJung:thread-join, r=sfackler
Mark-Simulacrum Aug 28, 2018
817ddb9
Rollup merge of #53472 - eddyb:fx-pls, r=pnkfelix
Mark-Simulacrum Aug 28, 2018
dba832e
Rollup merge of #53513 - nnethercote:inline-shallow_resolve, r=varkor
Mark-Simulacrum Aug 28, 2018
387d0c6
Rollup merge of #53622 - petrochenkov:nomain, r=oli-obk
Mark-Simulacrum Aug 28, 2018
0a0157e
Rollup merge of #53655 - jcpst:with_applicability, r=estebank
Mark-Simulacrum Aug 28, 2018
842b06b
Rollup merge of #53684 - alexcrichton:suggest-remove, r=oli-obk
Mark-Simulacrum Aug 28, 2018
682c191
Rollup merge of #53685 - alexcrichton:more-keywords, r=varkor
Mark-Simulacrum Aug 28, 2018
f922ac0
Rollup merge of #53702 - jkozlowski:correct_version_for_macro_vis_mat…
Mark-Simulacrum Aug 28, 2018
94e4a29
Rollup merge of #53727 - estebank:incorrect-deref-suggestion, r=nikom…
Mark-Simulacrum Aug 28, 2018
fe5b88a
Rollup merge of #53732 - emilio:foreign-fn, r=nrc
Mark-Simulacrum Aug 28, 2018
3557bd1
Rollup merge of #53733 - nnethercote:avoid-unroll_place, r=nikomatsakis
Mark-Simulacrum Aug 28, 2018
33d83eb
Rollup merge of #53740 - japaric:readobj, r=alexcrichton
Mark-Simulacrum Aug 28, 2018
16b7aa1
Rollup merge of #53743 - oconnor663:target_env, r=kennytm
Mark-Simulacrum Aug 28, 2018
3969ad2
Rollup merge of #53747 - GuillaumeGomez:rustdoc-fixes, r=QuietMisdreavus
Mark-Simulacrum Aug 28, 2018
2f2a4a1
Rollup merge of #53753 - RalfJung:keep-stage, r=nikomatsakis
Mark-Simulacrum Aug 28, 2018
4028a95
Rollup merge of #53768 - RalfJung:gitignore, r=nikomatsakis
Mark-Simulacrum Aug 28, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to 8000
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/librustc/infer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,11 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
self.resolve_type_vars_if_possible(t).to_string()
}

pub fn shallow_resolve(&self, typ: Ty<'tcx>) -> Ty<'tcx> {
// We have this force-inlined variant of shallow_resolve() for the one
// callsite that is extremely hot. All other callsites use the normal
// variant.
#[inline(always)]
pub fn inlined_shallow_resolve(&self, typ: Ty<'tcx>) -> Ty<'tcx> {
match typ.sty {
ty::Infer(ty::TyVar(v)) => {
// Not entirely obvious: if `typ` is a type variable,
Expand Down Expand Up @@ -1157,6 +1161,10 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
}
}

pub fn shallow_resolve(&self, typ: Ty<'tcx>) -> Ty<'tcx> {
self.inlined_shallow_resolve(typ)
}

pub fn resolve_type_vars_if_possible<T>(&self, value: &T) -> T
where T: TypeFoldable<'tcx>
{
Expand Down
3 changes: 2 additions & 1 deletion src/librustc/traits/fulfill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@ impl<'a, 'b, 'gcx, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'b, 'gcx,
// doing more work yet
if !pending_obligation.stalled_on.is_empty() {
if pending_obligation.stalled_on.iter().all(|&ty| {
let resolved_ty = self.selcx.infcx().shallow_resolve(&ty);
// Use the force-inlined variant of shallow_resolve() because this code is hot.
let resolved_ty = self.selcx.infcx().inlined_shallow_resolve(&ty);
resolved_ty == ty // nothing changed here
}) {
debug!("process_predicate: pending obligation {:?} still stalled on {:?}",
Expand Down
0