Move #[track_caller] behind feature gate

This commit is contained in:
ConnorSkees 2020-01-20 13:39:20 -05:00
parent 25b4bebdf8
commit 75f38ba416
3 changed files with 4 additions and 3 deletions

View File

@ -3,7 +3,7 @@ name = "grass"
version = "0.1.0"
description = "An SCSS compiler in Rust"
readme = "README.md"
license = "MIT OR Apache-2.0"
license = "MIT"
categories = ["command-line-utilities", "web-programming"]
keywords = ["scss", "sass", "css"]
repository = "https://github.com/connorskees/grass"
@ -26,6 +26,7 @@ clap = { version = "2.33.0", optional = true }
[features]
default = ["commandline"]
commandline = ["clap"]
nightly = []
[dev-dependencies]
# test imports

View File

@ -39,7 +39,7 @@
// than they should
clippy::module_name_repetitions
)]
#![feature(track_caller)]
#![cfg_attr(feature = "nightly", feature(track_caller))]
// todo! handle erroring on styles at the toplevel
use std::fmt::{self, Display};
use std::fs;

View File

@ -18,7 +18,7 @@ pub(crate) fn devour_whitespace<I: Iterator<Item = W>, W: IsWhitespace>(s: &mut
found_whitespace
}
#[track_caller]
#[cfg_attr(feature = "nightly", track_caller)]
pub(crate) fn deref_variable(name: &str, scope: &Scope) -> Vec<Token> {
let mut toks = scope
.vars