commit
1b7bebf84d
@ -339,7 +339,7 @@ fn call_with_ref<'a, F>(some_closure:F) -> i32
|
||||
where F: Fn(&'a 32) -> i32 {
|
||||
```
|
||||
|
||||
However this presents a problem with in our case. When you specify the explict
|
||||
However this presents a problem with in our case. When you specify the explicit
|
||||
lifetime on a function it binds that lifetime to the *entire* scope of the function
|
||||
instead of just the invocation scope of our closure. This means that the borrow checker
|
||||
will see a mutable reference in the same lifetime as our immutable reference and fail
|
||||
@ -354,7 +354,7 @@ fn call_with_ref<F>(some_closure:F) -> i32
|
||||
```
|
||||
|
||||
This lets the Rust compiler find the minimum lifetime to invoke our closure and
|
||||
satisfy the borrow checker's rules. Our function then compiles and excutes as we
|
||||
satisfy the borrow checker's rules. Our function then compiles and executes as we
|
||||
expect.
|
||||
|
||||
```rust
|
||||
|
@ -431,7 +431,7 @@ one.
|
||||
|
||||
Cargo will ignore files in subdirectories of the `tests/` directory.
|
||||
Therefore shared modules in integrations tests are possible.
|
||||
For example `tests/common/mod.rs` is not seperatly compiled by cargo but can
|
||||
For example `tests/common/mod.rs` is not separately compiled by cargo but can
|
||||
be imported in every test with `mod common;`
|
||||
|
||||
That's all there is to the `tests` directory. The `tests` module isn't needed
|
||||
|
@ -107,7 +107,7 @@ pub enum Class {
|
||||
///
|
||||
/// The classifier will call into the `Writer` implementation as it finds spans
|
||||
/// of text to highlight. Exactly how that text should be highlighted is up to
|
||||
/// the implemention.
|
||||
/// the implementation.
|
||||
pub trait Writer {
|
||||
/// Called when we start processing a span of text that should be highlighted.
|
||||
/// The `Class` argument specifies how it should be highlighted.
|
||||
|
@ -2716,7 +2716,7 @@ impl<'a> fmt::Display for Sidebar<'a> {
|
||||
let parentlen = cx.current.len() - if it.is_mod() {1} else {0};
|
||||
|
||||
// the sidebar is designed to display sibling functions, modules and
|
||||
// other miscellaneous informations. since there are lots of sibling
|
||||
// other miscellaneous information. since there are lots of sibling
|
||||
// items (and that causes quadratic growth in large modules),
|
||||
// we refactor common parts into a shared JavaScript file per module.
|
||||
// still, we don't move everything into JS because we want to preserve
|
||||
|
@ -239,7 +239,7 @@ mod fallback {
|
||||
text[..offset].iter().rposition(|elt| *elt == x)
|
||||
}
|
||||
|
||||
// test fallback implementations on all plattforms
|
||||
// test fallback implementations on all platforms
|
||||
#[test]
|
||||
fn matches_one() {
|
||||
assert_eq!(Some(0), memchr(b'a', b"a"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user