Giter VIP home page Giter VIP logo

Comments (6)

svend avatar svend commented on September 27, 2024

Building with rust 1.11.0 works. Let me know if I should file an issue with rust.

ubuntu@host:~/syn$ rustc --version --verbose
rustc 1.11.0 (9b21dcd6a 2016-08-15)
binary: rustc
commit-hash: 9b21dcd6a89f38e8ceccb2ede8c9027cb409f6e3
commit-date: 2016-08-15
host: x86_64-unknown-linux-gnu
release: 1.11.0
ubuntu@host:~/syn$ cargo build --release --verbose
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling quote v0.2.0
     Running `rustc /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/quote-0.2.0/src/lib.rs --crate-name quote --crate-type lib -C opt-level=3 -C metadata=9442466506b24325 -C extra-filename=-9442466506b24325 --out-dir /home/ubuntu/syn/target/release/deps --emit=dep-info,link -L dependency=/home/ubuntu/syn/target/release/deps -L dependency=/home/ubuntu/syn/target/release/deps --cap-lints allow`
   Compiling syn v0.8.0 (file:///home/ubuntu/syn)
     Running `rustc src/lib.rs --crate-name syn --crate-type lib -C opt-level=3 --cfg feature=\"quote\" --cfg feature=\"default\" --cfg feature=\"printing\" --cfg feature=\"parsing\" --out-dir /home/ubuntu/syn/target/release --emit=dep-info,link -L dependency=/home/ubuntu/syn/target/release -L dependency=/home/ubuntu/syn/target/release/deps --extern quote=/home/ubuntu/syn/target/release/deps/libquote-9442466506b24325.rlib`

from syn.

dtolnay avatar dtolnay commented on September 27, 2024

Definitely a compiler bug.

It goes away with this commit 3a2ea4b so I have a lead.

from syn.

svend avatar svend commented on September 27, 2024

@dtolnay Thanks. I filed an issue before I read your response. It is here: rust-lang/rust#36875

from syn.

dtolnay avatar dtolnay commented on September 27, 2024

Narrowed down further: e8b4e20.

from syn.

dtolnay avatar dtolnay commented on September 27, 2024

I can't work on this right now but I will do my best to release a workaround later tonight.

from syn.

dtolnay avatar dtolnay commented on September 27, 2024

I released a workaround in 0.8.1.

The following code triggered the bug:

pub fn str_chars(s: &str) -> Vec<char> {
    s.chars().collect()
}

The following workaround avoided the bug:

pub fn str_chars(s: &str) -> Vec<char> {
    let mut result = Vec::new();
    for ch in s.chars() {
        result.push(ch);
    }
    result
}

from syn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.