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

Rollup of 10 pull requests #25584

Closed
wants to merge 22 commits into from
Closed

Conversation

bleibig and others added 22 commits May 12, 2015 09:20
The source code uses `"whatever".as_bytes()`, not `b"whatever"`.
The byte string literal syntax `b"whatever"` is more idiomatic than
`"whatever".as_bytes()`.
That way old versions won't be a subsections of the 1.0.0 release.
Minor typo/grammar error.
This adds strictly more information to the source files and reduces the
need for customized tooling to render the book.

(While this should not change the output of _rustbook_, it is very
useful when rendering the sources with external tools like Pandoc.)
`{rust,ignore}` -> `rust,ignore
* Correctly lex CRLF in string literals
* Update `extern CRATE as NAME` syntax
* Allow leading `::` in view paths
* Allow TySums in type ascriptions and impls
* Allow macros to have visibility and attributes
* Update syntax for qualified path types and expressions
* Allow block expressions to be called () and indexed []
Minor tweak: the text explaining the Borrow trait talks about slices, but the example immediately following just uses a simple reference; there are no slices involved.

r? @steveklabnik
…excrichton

The source code snippet uses `"whatever".as_bytes()` but the compilation error message uses `b"whatever"`. Both should be consistent with each other.

r? @steveklabnik
…toc, r=alexcrichton

Currently the table of contents for `rustbook` doesn't signify which page you are on.

This PR adds an 'active' class to the link for the current page, and defines the CSS rule for that class to make the link underlined and bold.

Not sure about two things:
1) Is `current_page` is a good name for the function parameter? At first I thought `current_item` would be good, but then in the `walk_item` function, you'd have `item` and `current_item`.

2) For the CSS, is both bold and underline too much? At first I had it just be underlined, but that's also how the links look when they're hovered over.
That way old versions won't be a subsections of the 1.0.0 release.
Looks like this was an issue in the source material. I've let the editor know and he has told me he is correcting it there as well.

r? @steveklabnik
This has been a frequently-asked question on IRC, and it isn't obvious where to
look for the fix.  r? @steveklabnik
…=steveklabnik

This adds strictly more information to the source files and reduces the need for customized tooling to render the book. (While this should not change the output of _rustbook_, it is very useful when rendering the sources with external tools like Pandoc.)

This only adds the language marker to "first level" code blocks (and not to code blocks in comments inside of code examples).

r? @steveklabnik
@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@steveklabnik
Copy link
Member Author

@bors: r+ p=1

@bors
Copy link
Contributor

bors commented May 18, 2015

📌 Commit 1be4156 has been approved by steveklabnik

@bors
Copy link
Contributor

bors commented May 18, 2015

⌛ Testing commit 1be4156 with merge e648da0...

@bors
Copy link
Contributor

bors commented May 18, 2015

💔 Test failed - auto-linux-64-x-android-t

@steveklabnik
Copy link
Member Author

@bors: retry force

@bors
Copy link
Contributor

bors commented May 18, 2015

⌛ Testing commit 1be4156 with merge 21fc57e...

@bors
Copy link
Contributor

bors commented May 18, 2015

💔 Test failed - auto-mac-64-nopt-t

@Manishearth
Copy link
Member


failures:

---- num::from_str_radix_0 stdout ----
    <std macros>:5:22: 5:33 error: mismatched types:
 expected `core::result::Result<u32, core::num::ParseIntError>`,
    found `core::option::Option<_>`
(expected enum `core::result::Result`,
    found enum `core::option::Option`) [E0308]
<std macros>:5 if ! ( * left_val == * right_val ) {
                                    ^~~~~~~~~~~
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
<anon>:2:5: 2:56 note: expansion site
error: aborting due to previous error
thread 'num::from_str_radix_0' panicked at 'Box<Any>', /Users/rustbuild/src/rust-buildbot/slave/auto-mac-64-nopt-t/build/src/libsyntax/diagnostic.rs:211


---- num::from_str_radix_0 stdout ----
    <std macros>:5:22: 5:33 error: mismatched types:
 expected `core::result::Result<u32, core::num::ParseIntError>`,
    found `core::option::Option<_>`
(expected enum `core::result::Result`,
    found enum `core::option::Option`) [E0308]
<std macros>:5 if ! ( * left_val == * right_val ) {
                                    ^~~~~~~~~~~
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
<anon>:2:5: 2:56 note: expansion site
error: aborting due to previous error
thread 'num::from_str_radix_0' panicked at 'Box<Any>', /Users/rustbuild/src/rust-buildbot/slave/auto-mac-64-nopt-t/build/src/libsyntax/diagnostic.rs:211


---- num::from_str_radix_0 stdout ----
    <std macros>:5:22: 5:33 error: mismatched types:
 expected `core::result::Result<u32, core::num::ParseIntError>`,
    found `core::option::Option<_>`
(expected enum `core::result::Result`,
    found enum `core::option::Option`) [E0308]
<std macros>:5 if ! ( * left_val == * right_val ) {
                                    ^~~~~~~~~~~
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
<anon>:2:5: 2:56 note: expansion site
error: aborting due to previous error
thread 'num::from_str_radix_0' panicked at 'Box<Any>', /Users/rustbuild/src/rust-buildbot/slave/auto-mac-64-nopt-t/build/src/libsyntax/diagnostic.rs:211


---- num::from_str_radix_0 stdout ----
    <std macros>:5:22: 5:33 error: mismatched types:
 expected `core::result::Result<u32, core::num::ParseIntError>`,
    found `core::option::Option<_>`
(expected enum `core::result::Result`,
    found enum `core::option::Option`) [E0308]
<std macros>:5 if ! ( * left_val == * right_val ) {
                                    ^~~~~~~~~~~
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
<anon>:2:5: 2:56 note: expansion site
error: aborting due to previous error
thread 'num::from_str_radix_0' panicked at 'Box<Any>', /Users/rustbuild/src/rust-buildbot/slave/auto-mac-64-nopt-t/build/src/libsyntax/diagnostic.rs:211


---- num::from_str_radix_0 stdout ----
    <std macros>:5:22: 5:33 error: mismatched types:
 expected `core::result::Result<u32, core::num::ParseIntError>`,
    found `core::option::Option<_>`
(expected enum `core::result::Result`,
    found enum `core::option::Option`) [E0308]
<std macros>:5 if ! ( * left_val == * right_val ) {
                                    ^~~~~~~~~~~
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
<anon>:2:5: 2:56 note: expansion site
error: aborting due to previous error
thread 'num::from_str_radix_0' panicked at 'Box<Any>', /Users/rustbuild/src/rust-buildbot/slave/auto-mac-64-nopt-t/build/src/libsyntax/diagnostic.rs:211

@Manishearth
Copy link
Member

steveklabnik@1be4156 needs fixing

@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup
Projects
None yet
Development

Successfully merging this pull request may close these issues.