8000 Rollup of 10 pull requests by Centril · Pull Request #64209 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Rollup of 10 pull requests #64209

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

Merged
merged 69 commits into from
Sep 6, 2019
Merged
Changes from 1 commit
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
6896ed3
use wasi crate
newpavlov Aug 19, 2019
23cc850
return 0 from errno function
newpavlov Aug 19, 2019
cb52065
replace libc::nanosleep with wasi::poll_oneoff
newpavlov Aug 19, 2019
75a553f
remove to_string
newpavlov Aug 19, 2019
7a4f0ae
use wasi::get_args
newpavlov Aug 19, 2019
52d2871
use wasi::get_environ
newpavlov Aug 19, 2019
8394dbb
remove libc import
newpavlov Aug 19, 2019
338fc7d
use non-zero clock id
newpavlov Aug 19, 2019
7658a13
typo fix
newpavlov Aug 19, 2019
e5ba80a
use const
newpavlov Aug 19, 2019
c052376
fix
newpavlov Aug 19, 2019
744442d
fix C incompatibilities
newpavlov Aug 20, 2019
7daf890
Merge branch 'master' into wasi
newpavlov Aug 20, 2019
4dee102
use new get_args
newpavlov Aug 20, 2019
88fd945
update args
newpavlov Aug 21, 2019
a47e3c0
fixes
newpavlov Aug 21, 2019
926f364
move cvt
newpavlov Aug 21, 2019
3772146
Merge branch 'master' into wasi
newpavlov Aug 24, 2019
6374b84
update to wasi v0.7
newpavlov Aug 29, 2019
06acfb2
add wasi license to the licenses whitelist
newpavlov Aug 29, 2019
8000
127311b
whitelist wasi crate
newpavlov Aug 29, 2019
9fd203a
simplify code
newpavlov Aug 30, 2019
0662fcf
make wasi a target-specific dependency
newpavlov Sep 3, 2019
cb84aa4
Improve searching in rustdoc and add tests
ayuusweetfish Sep 2, 2019
53fe764
Assume non-git LLVM is fresh if the stamp file exists
cuviper Sep 4, 2019
21e7e3f
Point at variant on pattern field count mismatch
estebank Sep 5, 2019
af06bfb
resolve: extract `resolve_params`.
Centril Aug 28, 2019
f8835ee
resolve: cleanup using `with_rib`, etc.
Centril Aug 28, 2019
6d537d4
resolve: simplify `resolve_arm`.
Centril Aug 28, 2019
219ddde
resolve: extract `try_resolve_as_non_binding`.
Centril Aug 28, 2019
f343e84
resolve: add `type IdentMap<T>` alias.
Centril Aug 28, 2019
fd3b441
resolve: move `fresh_binding`.
Centril Aug 28, 2019
dc91e22
resolve: move `resolve_block` to a better place.
Centril Aug 28, 2019
70cae78
resolve: already-bound-check: account for or-patterns.
Centril Aug 28, 2019
166a558
resolve: revamp already-bound check -- fix some bugs.
Centril Sep 1, 2019
498ec59
resolve: add tests for already-bound check.
Centril Sep 1, 2019
896a1c7
resolve: account for general or-patterns in consistency checking.
Centril Sep 1, 2019
33317c7
resolve: add test for missing bindings in or-patterns.
Centril Sep 1, 2019
aa7a02b
resolve: test binding mode consistency for or-patterns.
Centril Sep 1, 2019
dbe6873
resolve: test consistent or-patterns being allowed.
Centril Sep 3, 2019
ca968a1
or-patterns: syntax: simplify `Arm.pats` and `ExprKind::Let.0`.
Centril Aug 27, 2019
998060b
or-patterns: syntax: adjust `visit` and `mut_visit`.
Centril Aug 27, 2019
ad3db72
or-patterns: syntax: adjust parser removing a hack.
Centril Aug 27, 2019
424492a
or-patterns: syntax: adjust pretty printing.
Centril Aug 27, 2019
76625eb
or-patterns: syntax: adjust derive, format, and building.
Centril Aug 27, 2019
3fccbac
or-patterns: adjust librustc_lint.
Centril Aug 27, 2019
d8ef907
or-patterns: adjust lowering of `ast::Arm` & `ast::ExprKind::Let`.
Centril Aug 28, 2019
a867c5f
resolve: merge `resolve_pats` and `resolve_pattern_top`.
Centril Sep 1, 2019
be95dee
or-patterns: adjust save_analysis wrt. `process_var_decl{_multi}`.
Centril Sep 2, 2019
d70b0c5
or-patterns: fix pprust-expr-roundtrip due to AST change.
Centril Sep 3, 2019
a7db1a4
or-patterns: address review comments.
Centril Sep 4, 2019
0341b78
resolve: bool -> enum PatBoundCtx
Centril Sep 4, 2019
24d0a01
review comment
estebank Sep 5, 2019
16ba502
or-patterns: fix fallout from #664128.
Centril Sep 5, 2019
c9bd2f7
Add missing code examples on Iterator trait
GuillaumeGomez Sep 5, 2019
d4d5aa4
Fix invalid span generation when it should be div
GuillaumeGomez Sep 5, 2019
0b7ba6e
std: Improve downstream codegen in `Command::env`
alexcrichton Sep 4, 2019
060fe88
fill metadata in rustc_lexer's Cargo.toml
matklad Sep 5, 2019
bb1e425
Add Fuchsia to actually_monotonic
cramertj Sep 5, 2019
5b99539
Rollup merge of #63676 - newpavlov:wasi, r=alexcrichton
Centril Sep 6, 2019
ab75a17
Rollup merge of #64094 - kawa-yoiko:rustdoc-search, r=GuillaumeGomez
Centril Sep 6, 2019
3c1630a
Rollup merge of #64111 - Centril:ast-only-patkind-or, r=petrochenkov
Centril Sep 6, 2019
37a022e
Rollup merge of #64156 - cuviper:gitless-llvm, r=alexcrichton
Centril Sep 6, 2019
6968e53
Rollup merge of #64161 - estebank:point-variant, r=Centril
Centril Sep 6, 2019
a852ebb
Rollup merge of #64174 - GuillaumeGomez:missing-iterator-examples, r=…
Centril Sep 6, 2019
2cb02ad
Rollup merge of #64175 - GuillaumeGomez:replace-span-when-it-should-b…
Centril Sep 6, 2019
77e736a
Rollup merge of #64186 - alexcrichton:improve-env-codegen, r=sfackler
Centril Sep 6, 2019
9d859b3
Rollup merge of #64190 - matklad:meta, r=cramertj
Centril Sep 6, 2019
61fcd05
Rollup merge of #64198 - cramertj:fuchsia-monotonic, r=alexcrichton
Centril Sep 6, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
resolve: extract resolve_params.
  • Loading branch information
Centril committed Sep 5, 2019
commit af06bfb84c47add51a41153f6f71fc07d4c60a8d
35 changes: 15 additions & 20 deletions src/librustc_resolve/late.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,14 +425,8 @@ impl<'a, 'tcx> Visitor<'tcx> for LateResolutionVisitor<'a, '_> {
self.label_ribs.push(Rib::new(rib_kind));

// Add each argument to the rib.
let mut bindings_list = FxHashMap::default();
for argument in &declaration.inputs {
self.resolve_pattern(&argument.pat, PatternSource::FnParam, &mut bindings_list);

self.visit_ty(&argument.ty);
self.resolve_params(&declaration.inputs);

debug!("(resolving function) recorded argument");
}
visit::walk_fn_ret_ty(self, &declaration.output);

// Resolve the function body, potentially inside the body of an async closure
Expand Down Expand Up @@ -1135,6 +1129,15 @@ impl<'a, 'b> LateResolutionVisitor<'a, '_> {
}
}

fn resolve_params(&mut self, params: &[Arg]) {
let mut bindings_list = FxHashMap::default();
for param in params {
self.resolve_pattern(&param.pat, PatternSource::FnParam, &mut bindings_list);
self.visit_ty(&param.ty);
debug!("(resolving function / closure) recorded parameter");
}
}

fn resolve_local(&mut self, local: &Local) {
// Resolve the type.
walk_list!(self, visit_ty, &local.ty);
Expand Down Expand Up @@ -1860,20 +1863,12 @@ impl<'a, 'b> LateResolutionVisitor<'a, '_> {
// `async |x| ...` gets desugared to `|x| future_from_generator(|| ...)`, so we need to
// resolve the arguments within the proper scopes so that usages of them inside the
// closure are detected as upvars rather than normal closure arg usages.
ExprKind::Closure(
_, IsAsync::Async { .. }, _,
ref fn_decl, ref body, _span,
) => {
let rib_kind = NormalRibKind;
self.ribs[ValueNS].push(Rib::new(rib_kind));
ExprKind::Closure(_, IsAsync::Async { .. }, _, ref fn_decl, ref body, _span) => {
self.ribs[ValueNS].push(Rib::new(NormalRibKind));
// Resolve arguments:
let mut bindings_list = FxHashMap::default();
for argument in &fn_decl.inputs {
self.resolve_pattern(&argument.pat, PatternSource::FnParam, &mut bindings_list);
self.visit_ty(&argument.ty);
}
// No need to resolve return type-- the outer closure return type is
// FunctionRetTy::Default
self.resolve_params(&fn_decl.inputs);
// No need to resolve return type --
// the outer closure return type is `FunctionRetTy::Default`.

// Now resolve the inner closure
{
Expand Down
0