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

rustdoc: Fix testing no_run code blocks #32811

Merged
merged 1 commit into from
Apr 12, 2016

Conversation

alexcrichton
Copy link
Member

This was a regression introduced by #31250 where the compiler deferred returning
the results of compilation a little too late (after the Stop check was looked
at). This commit alters the stop point to first try to return an erroneous
result and only if it was successful return the sentinel Err(0).

Closes #31576

@alexcrichton
Copy link
Member Author

This is small enough that we may be able to sneak it into beta as well, preventing the regression altogether!

@alexcrichton
Copy link
Member Author

r? @nikomatsakis

@nikomatsakis
Copy link
Contributor

makes sense to me... but ideally @nrc would give his take

@alexcrichton
Copy link
Member Author

Looks like I had to also ignore a test due to #32445 as it crashes rustdoc now

@nrc
Copy link
Member

nrc commented Apr 8, 2016

@bors: r+

@bors
Copy link
Contributor

bors commented Apr 8, 2016

📌 Commit b8526d7 has been approved by nrc

Manishearth added a commit to Manishearth/rust that referenced this pull request Apr 8, 2016
 This was a regression introduced by rust-lang#31250 where the compiler deferred returning
the results of compilation a little too late (after the `Stop` check was looked
at). This commit alters the stop point to first try to return an erroneous
`result` and only if it was successful return the sentinel `Err(0)`.

Closes rust-lang#31576
@bors
Copy link
Contributor

bors commented Apr 10, 2016

⌛ Testing commit b8526d7 with merge 40a1a29...

@bors
Copy link
Contributor

bors commented Apr 10, 2016

⛄ The build was interrupted to prioritize another pull request.

@bors
Copy link
Contributor

bors commented Apr 10, 2016

⌛ Testing commit b8526d7 with merge 2467295...

@Manishearth
Copy link
Member

@bors r-

failures:

---- [pretty] pretty/coerce-expect-unsized.rs stdout ----

error: pretty-printed source (expanded) does not typecheck
status: exit code: 101
command: i686-unknown-linux-gnu/stage2/bin/rustc - -Zno-trans --target=i686-unknown-linux-gnu -L i686-unknown-linux-gnu/test/run-pass/ -L i686-unknown-linux-gnu/test/run-pass/coerce-expect-unsized.stage2-i686-unknown-linux-gnu.pretty.libaux --cfg rtopt -C rpath -O -L i686-unknown-linux-gnu/rt
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
<anon>:74:73: 74:100 error: use of unstable library feature 'fmt_internals': internal to format_args! (see issue #0)
<anon>:74                                                                        [::std::fmt::ArgumentV1::new(__arg0,
                                                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:74:73: 74:100 help: add #![feature(fmt_internals)] to the crate attributes to enable
<anon>:63:37: 63:66 error: use of unstable library feature 'fmt_internals': internal to format_args! (see issue #0)
<anon>:63                  ::std::fmt::format(::std::fmt::Arguments::new_v1({
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:63:37: 63:66 help: add #![feature(fmt_internals)] to the crate attributes to enable
<anon>:18:5: 18:25 warning: unused import, #[warn(unused_imports)] on by default
<anon>:18 use std::prelude::v1::*;
              ^~~~~~~~~~~~~~~~~~~~
<anon>:15:10: 15:26 warning: lint unknown_features has been renamed to unused_features, #[warn(renamed_and_removed_lints)] on by default
<anon>:15 #![allow(unknown_features)]
                   ^~~~~~~~~~~~~~~~
error: aborting due to 2 previous errors

------------------------------------------

thread '[pretty] pretty/coerce-expect-unsized.rs' panicked at 'explicit panic', /buildslave/rust-buildbot/slave/auto-linux-32-opt/build/src/compiletest/runtest.rs:1679
note: Run with `RUST_BACKTRACE=1` for a backtrace.

---- [pretty] pretty/deriving-via-extension-hash-enum.rs stdout ----

error: pretty-printed source (expanded) does not typecheck
status: exit code: 101
command: i686-unknown-linux-gnu/stage2/bin/rustc - -Zno-trans --target=i686-unknown-linux-gnu -L i686-unknown-linux-gnu/test/run-pass/ -L i686-unknown-linux-gnu/test/run-pass/deriving-via-extension-hash-enum.stage2-i686-unknown-linux-gnu.pretty.libaux --cfg rtopt -C rpath -O -L i686-unknown-linux-gnu/rt
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
<anon>:27:46: 27:83 error: use of unstable library feature 'core_intrinsics': intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library (see issue #0)
<anon>:27                                              ::std::intrinsics::discriminant_value(self)
                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:27:46: 27:83 help: add #![feature(core_intrinsics)] to the crate attributes to enable
<anon>:34:46: 34:83 error: use of unstable library feature 'core_intrinsics': intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library (see issue #0)
<anon>:34                                              ::std::intrinsics::discriminant_value(self)
                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:34:46: 34:83 help: add #![feature(core_intrinsics)] to the crate attributes to enable
<anon>:51:46: 51:83 error: use of unstable library feature 'core_intrinsics': intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library (see issue #0)
<anon>:51                                              ::std::intrinsics::discriminant_value(self)
                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:51:46: 51:83 help: add #![feature(core_intrinsics)] to the crate attributes to enable
<anon>:56:46: 56:83 error: use of unstable library feature 'core_intrinsics': intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library (see issue #0)
<anon>:56                                              ::std::intrinsics::discriminant_value(self)
                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:56:46: 56:83 help: add #![feature(core_intrinsics)] to the crate attributes to enable
<anon>:61:46: 61:83 error: use of unstable library feature 'core_intrinsics': intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library (see issue #0)
<anon>:61                                              ::std::intrinsics::discriminant_value(self)
                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:61:46: 61:83 help: add #![feature(core_intrinsics)] to the crate attributes to enable
<anon>:66:46: 66:83 error: use of unstable library feature 'core_intrinsics': intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library (see issue #0)
<anon>:66                                              ::std::intrinsics::discriminant_value(self)
                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:66:46: 66:83 help: add #![feature(core_intrinsics)] to the crate attributes to enable
<anon>:4:5: 4:25 warning: unused import, #[warn(unused_imports)] on by default
<anon>:4 use std::prelude::v1::*;
             ^~~~~~~~~~~~~~~~~~~~
<anon>:19:1: 19:49 warning: enum is never used: `Foo`, #[warn(dead_code)] on by default
<anon>:19 enum Foo { Bar(isize, char), Baz(char, isize), }
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:20:1: 20:25 warning: unused attribute, #[warn(unused_attributes)] on by default
<anon>:20 #[automatically_derived]
          ^~~~~~~~~~~~~~~~~~~~~~~~
<anon>:43:1: 43:23 warning: enum is never used: `A`, #[warn(dead_code)] on by default
<anon>:43 enum A { B, C, D, E, }
          ^~~~~~~~~~~~~~~~~~~~~~
<anon>:44:1: 44:25 warning: unused attribute, #[warn(unused_attributes)] on by default
<anon>:44 #[automatically_derived]
          ^~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to 6 previous errors

------------------------------------------

thread '[pretty] pretty/deriving-via-extension-hash-enum.rs' panicked at 'explicit panic', /buildslave/rust-buildbot/slave/auto-linux-32-opt/build/src/compiletest/runtest.rs:1679

---- [pretty] pretty/foreign-dupe.rs stdout ----

error: pretty-printed source (expanded) does not typecheck
status: exit code: 101
command: i686-unknown-linux-gnu/stage2/bin/rustc - -Zno-trans --target=i686-unknown-linux-gnu -L i686-unknown-linux-gnu/test/run-pass/ -L i686-unknown-linux-gnu/test/run-pass/foreign-dupe.stage2-i686-unknown-linux-gnu.pretty.libaux --cfg rtopt -C rpath -O -L i686-unknown-linux-gnu/rt
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
<anon>:79:93: 79:120 error: use of unstable library feature 'fmt_internals': internal to format_args! (see issue #0)
<anon>:79                                                                                            [::std::fmt::ArgumentV1::new(__arg0,
                                                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:79:93: 79:120 help: add #![feature(fmt_internals)] to the crate attributes to enable
<anon>:81:93: 81:120 error: use of unstable library feature 'fmt_internals': internal to format_args! (see issue #0)
<anon>:81                                                                                             ::std::fmt::ArgumentV1::new(__arg1,
                                                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:81:93: 81:120 help: add #![feature(fmt_internals)] to the crate attributes to enable
<anon>:64:57: 64:86 error: use of unstable library feature 'fmt_internals': internal to format_args! (see issue #0)
<anon>:64                             ::std::rt::begin_unwind_fmt(::std::fmt::Arguments::new_v1({
                                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:64:57: 64:86 help: add #![feature(fmt_internals)] to the crate attributes to enable
<anon>:64:29: 64:56 error: use of unstable library feature 'libstd_sys_internals': used by the panic! macro (see issue #0)
<anon>:64                             ::std::rt::begin_unwind_fmt(::std::fmt::Arguments::new_v1({
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:64:29: 64:56 help: add #![feature(libstd_sys_internals)] to the crate attributes to enable
<anon>:117:93: 117:120 error: use of unstable library feature 'fmt_internals': internal to format_args! (see issue #0)
<anon>:117                                                                                            [::std::fmt::ArgumentV1::new(__arg0,
                                                                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:117:93: 117:120 help: add #![feature(fmt_internals)] to the crate attributes to enable
<anon>:119:93: 119:120 error: use of unstable library feature 'fmt_internals': internal to format_args! (see issue #0)
<anon>:119                                                                                             ::std::fmt::ArgumentV1::new(__arg1,
                                                                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:119:93: 119:120 help: add #![feature(fmt_internals)] to the crate attributes to enable
<anon>:102:57: 102:86 error: use of unstable library feature 'fmt_internals': internal to format_args! (see issue #0)
<anon>:102                             ::std::rt::begin_unwind_fmt(::std::fmt::Arguments::new_v1({
                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:102:57: 102:86 help: add #![feature(fmt_internals)] to the crate attributes to enable
<anon>:102:29: 102:56 error: use of unstable library feature 'libstd_sys_internals': used by the panic! macro (see issue #0)
<anon>:102                             ::std::rt::begin_unwind_fmt(::std::fmt::Arguments::new_v1({
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:102:29: 102:56 help: add #![feature(libstd_sys_internals)] to the crate attributes to enable
<anon>:19:5: 19:25 warning: unused import, #[warn(unused_imports)] on by default
<anon>:19 use std::prelude::v1::*;
              ^~~~~~~~~~~~~~~~~~~~
<anon>:25:9: 25:29 warning: unused import, #[warn(unused_imports)] on by default
<anon>:25     use std::prelude::v1::*;
                  ^~~~~~~~~~~~~~~~~~~~
<anon>:36:9: 36:29 warning: unused import, #[warn(unused_imports)] on by default
<anon>:36     use std::prelude::v1::*;
                  ^~~~~~~~~~~~~~~~~~~~
<anon>:46:9: 46:29 warning: unused import, #[warn(unused_imports)] on by default
<anon>:46     use std::prelude::v1::*;
                  ^~~~~~~~~~~~~~~~~~~~
error: aborting due to 8 previous errors

------------------------------------------

thread '[pretty] pretty/foreign-dupe.rs' panicked at 'explicit panic', /buildslave/rust-buildbot/slave/auto-linux-32-opt/build/src/compiletest/runtest.rs:1679


failures:
    [pretty] pretty/coerce-expect-unsized.rs
    [pretty] pretty/deriving-via-extension-hash-enum.rs
    [pretty] pretty/foreign-dupe.rs

@Manishearth Manishearth reopened this Apr 10, 2016
@Manishearth
Copy link
Member

@bors r- force clean

@Manishearth Manishearth reopened this Apr 10, 2016
@Manishearth
Copy link
Member

@bors clean

@Manishearth Manishearth reopened this Apr 10, 2016
@Manishearth
Copy link
Member

homu seems really confused about this PR :/

@Manishearth Manishearth reopened this Apr 10, 2016
@Manishearth
Copy link
Member

@bors clean force

@Manishearth
Copy link
Member

@bors r=nrc

hm, that failure wasn't due to this PR, though I could swear I saw it in the travis results. not sure what happened here.

@bors
Copy link
Contributor

bors commented Apr 10, 2016

📌 Commit b8526d7 has been approved by nrc

@Manishearth
Copy link
Member

@bors clean retry

@bors
Copy link
Contributor

bors commented Apr 10, 2016

⌛ Testing commit b8526d7 with merge 43220a7...

@bors
Copy link
Contributor

bors commented Apr 10, 2016

💔 Test failed - auto-win-msvc-32-opt

@alexcrichton
Copy link
Member Author

@bors: retry

On Sun, Apr 10, 2016 at 4:36 PM, bors notifications@github.com wrote:

[image: 💔] Test failed - auto-win-msvc-32-opt
http://buildbot.rust-lang.org/builders/auto-win-msvc-32-opt/builds/2932


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#32811 (comment)

@bors
Copy link
Contributor

bors commented Apr 11, 2016

⌛ Testing commit b8526d7 with merge 0ec0071...

@bors
Copy link
Contributor

bors commented Apr 11, 2016

💔 Test failed - auto-linux-musl-64-opt

This was a regression introduced by rust-lang#31250 where the compiler deferred returning
the results of compilation a little too late (after the `Stop` check was looked
at). This commit alters the stop point to first try to return an erroneous
`result` and only if it was successful return the sentinel `Err(0)`.

Closes rust-lang#31576
@alexcrichton
Copy link
Member Author

@bors: r=nrc

@bors
Copy link
Contributor

bors commented Apr 11, 2016

📌 Commit 42bcb40 has been approved by nrc

@bors
Copy link
Contributor

bors commented Apr 12, 2016

⌛ Testing commit 42bcb40 with merge 9330006...

bors added a commit that referenced this pull request Apr 12, 2016
rustdoc: Fix testing no_run code blocks

This was a regression introduced by #31250 where the compiler deferred returning
the results of compilation a little too late (after the `Stop` check was looked
at). This commit alters the stop point to first try to return an erroneous
`result` and only if it was successful return the sentinel `Err(0)`.

Closes #31576
@bors bors merged commit 42bcb40 into rust-lang:master Apr 12, 2016
@alexcrichton alexcrichton deleted the check-lints branch April 13, 2016 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants