Skip to content

Commit

Permalink
Merge 9a7a183 into efda039
Browse files Browse the repository at this point in the history
  • Loading branch information
IGI-111 authored Jul 18, 2024
2 parents efda039 + 9a7a183 commit b0ff31f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
5 changes: 3 additions & 2 deletions examples/storage_namespace/src/main.sw
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ contract;
use std::storage::storage_api::{read, write};

// ANCHOR: storage_namespace
#[namespace(example_namespace)]
storage {
example_namespace {
foo: u64 = 0,
}
// ANCHOR_END: storage_namespace
foo: u64 = 0,
}

abi StorageNamespaceExample {
Expand Down
13 changes: 3 additions & 10 deletions sway-core/src/transform/to_parsed_lang/convert_parse_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ use sway_types::{
ALLOW_ATTRIBUTE_NAME, CFG_ATTRIBUTE_NAME, CFG_EXPERIMENTAL_NEW_ENCODING,
CFG_PROGRAM_TYPE_ARG_NAME, CFG_TARGET_ARG_NAME, DEPRECATED_ATTRIBUTE_NAME,
DOC_ATTRIBUTE_NAME, DOC_COMMENT_ATTRIBUTE_NAME, FALLBACK_ATTRIBUTE_NAME,
INLINE_ATTRIBUTE_NAME, NAMESPACE_ATTRIBUTE_NAME, PAYABLE_ATTRIBUTE_NAME,
STORAGE_PURITY_ATTRIBUTE_NAME, STORAGE_PURITY_READ_NAME, STORAGE_PURITY_WRITE_NAME,
TEST_ATTRIBUTE_NAME, VALID_ATTRIBUTE_NAMES,
INLINE_ATTRIBUTE_NAME, PAYABLE_ATTRIBUTE_NAME, STORAGE_PURITY_ATTRIBUTE_NAME,
STORAGE_PURITY_READ_NAME, STORAGE_PURITY_WRITE_NAME, TEST_ATTRIBUTE_NAME,
VALID_ATTRIBUTE_NAMES,
},
integer_bits::IntegerBits,
BaseIdent,
Expand Down Expand Up @@ -4698,13 +4698,6 @@ fn item_attrs_to_map(
let attrs = attr_decl.attribute.get().into_iter();
for attr in attrs {
let name = attr.name.as_str();
if name == NAMESPACE_ATTRIBUTE_NAME {
handler.emit_warn(CompileWarning {
span: attr_decl.span().clone(),
warning_content: Warning::NamespaceAttributeDeprecated,
});
continue;
}
if !VALID_ATTRIBUTE_NAMES.contains(&name) {
handler.emit_warn(CompileWarning {
span: attr_decl.span().clone(),
Expand Down
2 changes: 0 additions & 2 deletions sway-types/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ pub const CFG_EXPERIMENTAL_NEW_ENCODING: &str = "experimental_new_encoding";

pub const DEPRECATED_ATTRIBUTE_NAME: &str = "deprecated";

pub const NAMESPACE_ATTRIBUTE_NAME: &str = "namespace";

pub const FALLBACK_ATTRIBUTE_NAME: &str = "fallback";

/// The list of valid attributes.
Expand Down

0 comments on commit b0ff31f

Please sign in to comment.