Comments (1)
Hmm, this doesn't compile:
fn main() {
fn subparsing_lifetime<'arg, 'new>(in_function: &'arg Vec<&'arg str>) -> (&'new (), &'arg ()) {
unreachable!()
}
let closure = |in_closure| subparsing_lifetime(&in_closure);
}
But this does:
fn main() {
fn subparsing_lifetime<'vec, 'str, 'new>(in_function: &'vec Vec<&'str str>) -> (&'new (), &'str ()) {
unreachable!()
}
let closure = |in_closure| subparsing_lifetime(&in_closure);
}
Interestingly, so does this:
fn accepts_vec_of_str<'arg, 'new>(arg: &'arg Vec<&'arg str>) -> (&'new (), &'arg ()) {
fn subparsing_lifetime<'arg, 'new>(in_function: &'arg Vec<&'arg str>) -> (&'new (), &'arg ()) {
unreachable!()
}
let closure = |in_closure: &'arg Vec<&'arg str>| subparsing_lifetime(&in_closure);
closure(arg)
}
from rust.
Related Issues (20)
- Use of match ergonomics affect borrow checking HOT 2
- Blanket, recursive impls cause bad compiler suggestions
- Chains of checked_add could get better codegen
- Review of Reference change regarding receivers and object safety HOT 1
- `Hash` implementation for `Path` ignores path separators HOT 4
- rust panic HOT 1
- Decide on Rule 4 variant for match ergonomics HOT 1
- opt-dist: separate dist-build from profiling HOT 4
- "SIGSEGV: invalid memory reference" when compiling with optimizations HOT 3
- Assigning the wrong fn type to a variable mentions 'pointer' vs 'item'
- ICE: `write_immediate_to_mplace: invalid Scalar layout:` with feature `const_mut_refs` and `const_refs_to_static` HOT 1
- ICE: called `Option::unwrap()` on a `None` value HOT 1
- ICE: `type mismatch when copying!` HOT 1
- Can't use `vmsr` instruction in `global_asm!` on `armv7r-none-eabihf` without `codegen-units=1` HOT 8
- `tarpaulin` and check-cfg HOT 4
- panic: "failed to open bitcode file" when changing `-Ccodegen-units` in successive compiles.
- VecDeque::split_off has unexpectedly poor performance characteristics when splitting off from the front.
- Unhelpful `.clone()` suggestion when moving a mutable reference HOT 1
- Miscompilation on release profile when `std::ptr::read` is used to cast byte primitive to some tuples in unreachable code paths HOT 4
- Tracking Issue for PathBuf::add_extension and Path::with_added_extension
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust.