Skip to content

Commit

Permalink
Add Deprecated annotation to prelude and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bcardiff committed Apr 8, 2019
1 parent 53c5872 commit eb325dc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/annotations.cr
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This annotations marks methods as deprecated.
#
# It receives an optional `StringLiteral` as single argument containing a deprecation notice.
#
# ```
# @[Deprecated("Use #bar instead")]
# def foo
# end
# ```
annotation Deprecated
end
1 change: 1 addition & 0 deletions src/docs_main.cr
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# It, for example, doesn't include API for the compiler, but does include
# the fictitious API for the Crystal::Macros module.

require "./annotations"
require "./big"
require "./compiler/crystal/macros"
require "./crypto/**"
Expand Down
1 change: 1 addition & 0 deletions src/prelude.cr
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ require "indexable"
require "string"

# Alpha-sorted list
require "annotations"
require "array"
require "atomic"
require "bool"
Expand Down

0 comments on commit eb325dc

Please sign in to comment.