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

Implement new literal type `Err` #57651

Merged
merged 14 commits into from Jan 20, 2019

Conversation

Projects
None yet
4 participants
@JohnTitor
Copy link
Contributor

JohnTitor commented Jan 16, 2019

Fixes #57384

I removed return Ok, otherwise, two errors occur. Any solutions?

r? @estebank

@JohnTitor

This comment has been minimized.

Copy link
Contributor Author

JohnTitor commented Jan 16, 2019

Hmm, the test failed. I'll fix it.

@rust-highfive

This comment was marked as outdated.

Copy link
Collaborator

rust-highfive commented Jan 16, 2019

The job x86_64-gnu-llvm-6.0 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.
travis_time:end:0ec58ca4:start=1547599236590059658,finish=1547599237931439910,duration=1341380252
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
[00:53:12] 
[00:53:12] 
[00:53:12] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:53:12] Build completed unsuccessfully in 0:49:31
[00:53:12] Makefile:18: recipe for target 'all' failed
[00:53:12] make: *** [all] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:1074cab0
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Wed Jan 16 01:34:02 UTC 2019
---
travis_time:end:055c86aa:start=1547602442948217396,finish=1547602442953200190,duration=4982794
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:01eb0454
$ 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:33d94aa8
travis_time:start:33d94aa8
$ 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:099803e4
$ 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)

@estebank
Copy link
Contributor

estebank left a comment

You will need to modify

Show resolved Hide resolved src/libsyntax/parse/token.rs Outdated
Show resolved Hide resolved src/test/ui/parser/lex-bad-char-literals-5.rs Outdated
Show resolved Hide resolved src/libsyntax/parse/lexer/mod.rs Outdated
Show resolved Hide resolved src/libsyntax/ext/quote.rs Outdated
@JohnTitor

This comment has been minimized.

Copy link
Contributor Author

JohnTitor commented Jan 19, 2019

@estebank I posted some WIP commits, please review.

@rust-highfive

This comment was marked as outdated.

Copy link
Collaborator

rust-highfive commented Jan 19, 2019

The job x86_64-gnu-llvm-6.0 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.
travis_time:end:014e67f1:start=1547926772624169260,finish=1547926844755820702,duration=72131651442
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---

[00:03:24] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:03:24] tidy error: /checkout/src/test/ui/parser/lex-bad-char-literals-6.rs: missing trailing newline
[00:03:25] some tidy checks failed
[00:03:25] 
[00:03:25] 
[00:03:25] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:03:25] 
[00:03:25] 
[00:03:25] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:03:25] Build completed unsuccessfully in 0:00:46
[00:03:25] Build completed unsuccessfully in 0:00:46
[00:03:25] make: *** [tidy] Error 1
[00:03:25] Makefile:69: recipe for target 'tidy' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0a21e539
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Sat Jan 19 19:44:20 UTC 2019
---
travis_time:end:1a5e722c:start=1547927060717380708,finish=1547927060722566739,duration=5186031
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0167d750
$ 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:264c1ce6
travis_time:start:264c1ce6
$ 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:17a44301
$ 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)

Show resolved Hide resolved src/libsyntax/parse/mod.rs Outdated
Show resolved Hide resolved src/libsyntax/parse/lexer/mod.rs Outdated
Show resolved Hide resolved src/libsyntax/parse/lexer/mod.rs
String::from("character literal may only contain one codepoint")).raise();
self.err_span_(start_with_quote, pos,
"character literal may only contain one codepoint");
self.bump();

This comment has been minimized.

@estebank

estebank Jan 19, 2019

Contributor

This bump also looks suspect. I'm trying a change locally, but I believe there's a high likelihood that removing this self.bump() will fix the problem with let x = 'asdf //~^ ERROR '.

This comment has been minimized.

@estebank

estebank Jan 19, 2019

Contributor

Ok, upon further review, just revert this one change and let's fatally fail on this case. The code is beyond meaninful recovery at this point. We'll keep the current behavior for unterminated char literals, but recover in all other cases.

This comment has been minimized.

@estebank

estebank Jan 20, 2019

Contributor

@JohnTitor I believe that with these changes we'll be as close as we can get quickly to the "ideal" output:

estebank@63ad0a4

This comment has been minimized.

@JohnTitor

JohnTitor Jan 20, 2019

Author Contributor

I'm grateful for your support! Following your commit, I added some commits.

@estebank

This comment has been minimized.

Copy link
Contributor

estebank commented Jan 20, 2019

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 20, 2019

📌 Commit 4005d3a has been approved by estebank

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 20, 2019

⌛️ Testing commit 4005d3a with merge 2ab5d8a...

bors added a commit that referenced this pull request Jan 20, 2019

Auto merge of #57651 - JohnTitor:give-char-type, r=estebank
Implement new literal type `Err`

Fixes #57384

I removed `return Ok`, otherwise, two errors occur. Any solutions?

r? @estebank
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 20, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: estebank
Pushing 2ab5d8a to master...

@bors bors merged commit 4005d3a into rust-lang:master Jan 20, 2019

1 check passed

homu Test successful
Details

@JohnTitor JohnTitor deleted the JohnTitor:give-char-type branch Jan 20, 2019

mikerite added a commit to mikerite/rust-clippy that referenced this pull request Jan 20, 2019

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 21, 2019

submodules: update clippy from 1b89724b to 1838bfe5
Changes:
````
Fixing typo in CONTRIBUTING.md
Fix breakage due to rust-lang#57651
Run rustfmt
Fixed breakage due to rust-lang#57489
Fix breakage due to rust-lang#57755
Catch up with `format_args` change
Fix bad `while_let_on_iterator` suggestion.
rustup rust-lang#57747
Fixing issues pointed out by dogfood tests.
Update to collect all the files then throw the error.
Adding a test for checking if test files are missing.
Remove bors.toml
add applicability to lint name suggestion
````

Arkweid added a commit to Arkweid/rust-clippy that referenced this pull request Jan 23, 2019

Merge branch 'master' into add-lints-aseert-checks
* master: (58 commits)
  Rustfmt all the things
  Don't make decisions on values that don't represent the decision
  Improving comments.
  Rustup
  Added rustfix to the test.
  Improve span shortening.
  Added "make_return" and "blockify" convenience methods in Sugg and used them in "needless_bool".
  Actually check for constants.
  Fixed potential mistakes with nesting. Added tests.
  formatting fix
  Update clippy_lints/src/needless_bool.rs
  formatting fix
  Fixing typo in CONTRIBUTING.md
  Fix breakage due to rust-lang/rust#57651
  needless bool lint suggestion is wrapped in brackets if it is an "else" clause of an "if-else" statement
  Fix automatic suggestion on `use_self`.
  Remove negative integer literal checks.
  Fix `implicit_return` false positives.
  Run rustfmt
  Fixed breakage due to rust-lang/rust#57489
  ...

VardhanThigle pushed a commit to jethrogb/rust that referenced this pull request Jan 31, 2019

submodules: update clippy from 1b89724b to 1838bfe5
Changes:
````
Fixing typo in CONTRIBUTING.md
Fix breakage due to rust-lang#57651
Run rustfmt
Fixed breakage due to rust-lang#57489
Fix breakage due to rust-lang#57755
Catch up with `format_args` change
Fix bad `while_let_on_iterator` suggestion.
rustup rust-lang#57747
Fixing issues pointed out by dogfood tests.
Update to collect all the files then throw the error.
Adding a test for checking if test files are missing.
Remove bors.toml
add applicability to lint name suggestion
````
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment