Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Deprecated and Unimplemented attributes #785

Closed
wants to merge 9 commits into from
3 changes: 2 additions & 1 deletion compiler/qsc_frontend/src/compile/preprocess.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use qsc_ast::{
ast::{Attr, ExprKind, ItemKind, Namespace, Stmt, StmtKind},
mut_visit::MutVisitor,
};
use qsc_hir::hir;
use std::rc::Rc;

use super::TargetProfile;
Expand Down Expand Up @@ -119,7 +120,7 @@ impl MutVisitor for Conditional {

fn matches_target(attrs: &[Box<Attr>], target: TargetProfile) -> bool {
attrs.iter().all(|attr| {
if attr.name.name.as_ref() == "Config" {
if hir::Attr::from_str(attr.name.name.as_ref()) == Ok(hir::Attr::Config) {
if let ExprKind::Paren(inner) = attr.arg.kind.as_ref() {
match inner.kind.as_ref() {
ExprKind::Path(path) => {
Expand Down
Loading