Skip to content
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

Remove `ast::Guard` #62075

Merged
merged 1 commit into from Jun 24, 2019

Conversation

Projects
None yet
4 participants
@Centril
Copy link
Member

commented Jun 23, 2019

With the introduction of ast::ExprKind::Let in #60861, the ast::Guard structure is now redundant in terms of representing if let guards in AST since it can be represented by ExprKind::Let syntactically. Therefore, we remove ast::Guard here.

However, we keep hir::Guard because the semantic representation is a different matter and this story is more unclear right now (might involve goto 'arm in HIR or something...).

r? @petrochenkov

@petrochenkov

This comment has been minimized.

Copy link
Contributor

commented Jun 23, 2019

@bors r+ rollup

@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 23, 2019

📌 Commit 4d53714 has been approved by petrochenkov

@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 23, 2019

⌛️ Testing commit 4d53714 with merge b5383b8...

bors added a commit that referenced this pull request Jun 23, 2019

Auto merge of #62075 - Centril:guardless-match-arms, r=petrochenkov
Remove `ast::Guard`

With the introduction of `ast::ExprKind::Let` in #60861, the `ast::Guard` structure is now redundant in terms of representing [`if let` guards](#51114) in AST since it can be represented by `ExprKind::Let` syntactically. Therefore, we remove `ast::Guard` here.

However, we keep `hir::Guard` because the semantic representation is a different matter and this story is more unclear right now (might involve `goto 'arm` in HIR or something...).

r? @petrochenkov
@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 23, 2019

💔 Test failed - checks-travis

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jun 23, 2019

The job arm-android of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[01:44:33] test string::test_str_truncate ... ok
[01:44:33] test string::test_str_truncate_invalid_len ... ok
[01:44:33] test string::test_retain ... ok
[01:44:33] test string::test_str_truncate_split_codepoint ... ok
[01:44:33] error: test failed, to rerun pass '-p alloc --test collectionstests'
[01:44:33] died due to signal 11
[01:44:33] 
[01:44:33] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "arm-linux-androideabi" "-j" "4" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "-p" "alloc" "--"
[01:44:33] expected success, got: exit code: 3
[01:44:33] 
---
travis_time:end:01eb9dbb:start=1561292788302978447,finish=1561292788312777061,duration=9798614
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:1e5bbdfb
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:1c2e7180
travis_time:start:1c2e7180
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:0a19634c
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@Centril

This comment has been minimized.

Copy link
Member Author

commented Jun 23, 2019

@bors retry collectionstests

Centril added a commit to Centril/rust that referenced this pull request Jun 23, 2019

Rollup merge of rust-lang#62075 - Centril:guardless-match-arms, r=pet…
…rochenkov

Remove `ast::Guard`

With the introduction of `ast::ExprKind::Let` in rust-lang#60861, the `ast::Guard` structure is now redundant in terms of representing [`if let` guards](rust-lang#51114) in AST since it can be represented by `ExprKind::Let` syntactically. Therefore, we remove `ast::Guard` here.

However, we keep `hir::Guard` because the semantic representation is a different matter and this story is more unclear right now (might involve `goto 'arm` in HIR or something...).

r? @petrochenkov

bors added a commit that referenced this pull request Jun 23, 2019

Auto merge of #62080 - Centril:rollup-1wmgoy8, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #61778 (compiletest: Introduce `// {check,build,run}-pass` pass modes)
 - #62037 (Speed up tidy)
 - #62052 (submodules: Update clippy from 5a11ed7 to c5d1ecd)
 - #62070 (Run rustfmt on some libsyntax files)
 - #62075 (Remove `ast::Guard`)

Failed merges:

r? @ghost
@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 24, 2019

⌛️ Testing commit 4d53714 with merge 3cc3486...

bors added a commit that referenced this pull request Jun 24, 2019

Auto merge of #62075 - Centril:guardless-match-arms, r=petrochenkov
Remove `ast::Guard`

With the introduction of `ast::ExprKind::Let` in #60861, the `ast::Guard` structure is now redundant in terms of representing [`if let` guards](#51114) in AST since it can be represented by `ExprKind::Let` syntactically. Therefore, we remove `ast::Guard` here.

However, we keep `hir::Guard` because the semantic representation is a different matter and this story is more unclear right now (might involve `goto 'arm` in HIR or something...).

r? @petrochenkov
@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 24, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: petrochenkov
Pushing 3cc3486 to master...

@bors bors added the merged-by-bors label Jun 24, 2019

@bors bors merged commit 4d53714 into rust-lang:master Jun 24, 2019

3 checks passed

Travis CI - Pull Request Build Passed
Details
homu Test successful
Details
pr Build #20190623.16 succeeded
Details

@Centril Centril deleted the Centril:guardless-match-arms branch Jun 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.