This website requires JavaScript.
Explore
Help
Register
Sign In
mikros
/
rust
Watch
1
Star
0
Fork
0
You've already forked rust
Code
Issues
Pull Requests
Packages
Projects
Releases
Wiki
Activity
b727b9efd7
rust
/
src
/
test
/
compile-fail
/
borrowck-wg-borrow-mut-to-imm-fail-2.rs
6 lines
102 B
Rust
Raw
Normal View
History
Unescape
Escape
librustc: Allow `&mut` to be loaned; allow `self` to be loaned; make `&mut` loanable to `&`. r=nmatsakis
2013-01-23 20:15:06 -06:00
fn
main
(
)
{
let
mut
b
=
~
3
;
new borrow checker (mass squash)
2013-03-15 14:24:24 -05:00
let
_x
=
&
mut
*
b
;
let
_y
=
&
mut
*
b
;
//~ ERROR cannot borrow
librustc: Allow `&mut` to be loaned; allow `self` to be loaned; make `&mut` loanable to `&`. r=nmatsakis
2013-01-23 20:15:06 -06:00
}
Reference in New Issue
Copy Permalink